calling a .dll function?

More
20 years 4 months ago #18145 by MajorTom
Maybe that's the wrong terminology but there must be some way to call a native package or virtually "press" a key for the player?

Is there any way to call a function like:
"icDirector.InternalCamera" or "icDirector.ExternalCamera" directly with pog?

Why? If you create a brief external view of a ship with iDirector it's stopped dead in it's tracks. (because iDirector suspends/purges the input keybinds). As a result you have to reapply throttle to get the ship moving again. [V]

You can intercept the keybind for the camera package, to get an external view, without stopping the ship, but you can't get it back to the internal view (Hud) without pressing the (F1) key manually.

I've tried Task.Call and Task.Detach with the camera function as a string but flux seems to just ignore that [?]




Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
20 years 4 months ago #10679 by GrandpaTrout
I have never done it. I do expect it is possible, because the libraries do it all the time. It might just be a case of figuring out how to tell the pog compiler - now setup the calling stack for a real C++ call, and not a script call. The library header files do have special compiler flags in them. What I don't know - does the recieving DLL need to be specially prepared somehow to take this call? I would think not. too much work. I am guessing anything can be called. But if that called thing was not designed to be called from POG - crash.

It is worth looking into. I have a little free time tomorrow. I wonder what the microsoft debugger has to say about the calling stack....

-Gtrout

Please Log in or Create an account to join the conversation.

More
20 years 4 months ago #10689 by MajorTom
Replied by MajorTom on topic calling a .dll function?

Originally posted by GrandpaTrout



It is worth looking into. I have a little free time tomorrow. I wonder what the microsoft debugger has to say about the calling stack....

-Gtrout


That would be really cool :D

Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
20 years 4 months ago #10720 by GrandpaTrout
No luck. What I think is happening is this: When they want to call into a DLL from POG they declared a "Flux Extension" and this tells the POG interpreter - when you see a call by this name, don't go look for a POG package, instead, call over to this DLL. Which makes sense, but it does not leave us with a way to extend the DLL calls without recompiling FLUX.

My strongest reason for believing this is that I can find no difference in the header files (from a POG viewpoint) that would tell the POG compiler, hey, handle this special. Reading the header files again, it is clear the special behavior is on the C++ side. And, if I examine the binary files, I can find the names of the flux calls. So, again, I think the name matching is done in C++.

Which leaves us nowhere as far as getting a keypress activated from POG.

-Gtrout

Please Log in or Create an account to join the conversation.

More
20 years 4 months ago #10726 by MajorTom

Please Log in or Create an account to join the conversation.

More
20 years 4 months ago #10799 by Second Chance
I don't think PS ever intended EoC to be quite that moddable. Which is a shame, because it would mean we could've possibly replaced the physics engine used with one that has a different flight model. Oh well, maybe one day they'll release the source.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.