Skip to main content
GameDev.net gamedev.net
🔒 Locked

Dynamicly Linked EXE?

Started by Andrew Russell Jul 16, 2004 at 5:32 AM 3 replies 800+ views
Original Post
Andrew Russell
Andrew Russell
Being fairly theoretical at the moment, so this is mostly for interest, but is this crazy stunt even possible? Basicly I want an exe to act as a DLL for another exe. I know it can be done other (probably eaiser) ways, (2 exes + 1 dll), I'd just like to see if it can be done this way. Cheers, - AR
SiCrane
SiCrane
Yes, you can use an EXE in pretty much the same way you can use a DLL with LoadLibrary() and all that. However, if you mean direct procedure calls across process boundaries, from one running exe to another running exe, then I think the answer is no.
Skizz
Skizz
That shouldn't be a problem. You will need to export the DLL symbols that are need, DllMain for one. The LoadLibrary documentation explicitly states that an .exe can be loaded. Use GetProcAddress to get the function addresses.

Skizz
Andrew Russell
Andrew Russell
Hey cool :) thanks chaps.

Quote:
However, if you mean direct procedure calls across process boundaries, from one running exe to another running exe, then I think the answer is no
no, just dynamic linkage.

On second thoughts, it's probably better to go with the dll + several exes anyway, but it's useful to note I can dynamicly link an exe.

Ta.
SiCrane
SiCrane
Just keep in mind you have to be careful how you build the exes if you do try it. If you bork the settings, you'll stack overflow (it goes into a infinite loop of trying to load itself).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.