export
-
I tryied to export function from the executable module. In the same way as a dll export. It "works" - I can see it as an export in Dependency walker utility But: Whan I use LoadLibrary from different executable to load it it also work but when i call it, it always crashes inside. (when i rewrite first exe into dll it works fain) Is there any special steps which must be done to export function from EXE module?
viliam
-
I tryied to export function from the executable module. In the same way as a dll export. It "works" - I can see it as an export in Dependency walker utility But: Whan I use LoadLibrary from different executable to load it it also work but when i call it, it always crashes inside. (when i rewrite first exe into dll it works fain) Is there any special steps which must be done to export function from EXE module?
viliam
Hi , Just try to debug the Exported function through the Exe where your invoking the exported function. I hope there must be a problem with App ptr.
-
I tryied to export function from the executable module. In the same way as a dll export. It "works" - I can see it as an export in Dependency walker utility But: Whan I use LoadLibrary from different executable to load it it also work but when i call it, it always crashes inside. (when i rewrite first exe into dll it works fain) Is there any special steps which must be done to export function from EXE module?
viliam
I don't know if that's going to work since the exe loaded with LoadLibrary hasn't run so no initialization is done. Can you even step into the loaded exe file's code with the debugger? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
I don't know if that's going to work since the exe loaded with LoadLibrary hasn't run so no initialization is done. Can you even step into the loaded exe file's code with the debugger? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Mark Salsbery wrote:
I don't know if that's going to work since the exe loaded with LoadLibrary hasn't run so no initialization is done.
I agree. Probably he can only extract resources. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
Mark Salsbery wrote:
I don't know if that's going to work since the exe loaded with LoadLibrary hasn't run so no initialization is done.
I agree. Probably he can only extract resources. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain ClarkeCPallini wrote:
Probably he can only extract resources.
That was my understanding :)
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
I don't know if that's going to work since the exe loaded with LoadLibrary hasn't run so no initialization is done. Can you even step into the loaded exe file's code with the debugger? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
thankx, I can step into the function and if function is empty or just sets variables - it works The problem begun whan i called some API function GetModuleFileName(NULL, szPath, _MAX_PATH); does not work and some others thow exception. You probably right, there is some initialization missing ..for resource it definetelly works.
viliam