Exporting function from an .exe to be used by loaded .dll
From: ledZ (ledz_at_argz.com)
Date: 03/03/04
- Next message: Paul G. Tobey [eMVP]: "Re: How to connect windows2000 with ActiveSync"
- Previous message: Bruce Eitman \(eMVP\): "Re: modify IE start page"
- Next in thread: Valter Minute: "Re: Exporting function from an .exe to be used by loaded .dll"
- Reply: Valter Minute: "Re: Exporting function from an .exe to be used by loaded .dll"
- Reply: Bruce Eitman \(eMVP\): "Re: Exporting function from an .exe to be used by loaded .dll"
- Reply: Russ Keldorph [MS]: "RE: Exporting function from an .exe to be used by loaded .dll"
- Messages sorted by: [ date ] [ thread ]
Date: 3 Mar 2004 08:43:22 -0800
I have the following design.
Build host appname.exe that exports some useful functions. When I
compile this, appname.lib is created with the exported files.
Create plugin dlls that link with appname.lib and are loaded at run
time by the host appname.exe using LoadLibrary(plugin_name). These
plugins can use all the functions exported by appname.exe.
I have this design coded and working flawlessly on Windows XP. Using
the same code base I then created my CE.net version in EVC4. When I
run appname.exe on CE (in the emulator - no hardware yet) the plugins
do not load and GetLastError() returns 193 - Bad EXE Format.
I can't figure out why this is happening.
As a test I created a simple .exe and simple .dll in EVC4. The exe
exports one function and the dll uses it.
The dll load failed with the same error but as soon as I remove the
exported function from the exe and its reference from the dll it loads
fine.
This design is critical to my application - any help is appreciated.
- Next message: Paul G. Tobey [eMVP]: "Re: How to connect windows2000 with ActiveSync"
- Previous message: Bruce Eitman \(eMVP\): "Re: modify IE start page"
- Next in thread: Valter Minute: "Re: Exporting function from an .exe to be used by loaded .dll"
- Reply: Valter Minute: "Re: Exporting function from an .exe to be used by loaded .dll"
- Reply: Bruce Eitman \(eMVP\): "Re: Exporting function from an .exe to be used by loaded .dll"
- Reply: Russ Keldorph [MS]: "RE: Exporting function from an .exe to be used by loaded .dll"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|