Click to See Complete Forum and Search --> : howto loadlibrary mfc exe?


georgevs
September 13th, 2006, 06:01 AM
Hi group,

I am trying to load MFC exe module as dynamic link library and call an exported function from it:
LoadLibrary("myapp1.exe")
Myapp1Test();
The exe is loaded successfully and the function is entered,
but whichever function is called exception raises.
It seems as virtual addresses in the loaded exe mess up with loading application;

Is there any standard/documented way to load exe as DLL?
How is the CRT initialized in this manner?

Thanks,
George VS.