RE: Exporting function from an .exe to be used by loaded .dll
From: Russ Keldorph [MS] (russellk_at_online.microsoft.com)
Date: 03/03/04
- Next message: Andrew: "Re: memory setup issue"
- Previous message: Steve Maillet \(eMVP\): "Re: Event handles in WinCE"
- In reply to: ledZ: "Exporting function from an .exe to be used by loaded .dll"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 03 Mar 2004 23:00:40 GMT
Unfortunately, you've discovered a limitation of the CE loader. Unlike XP,
CE will only load and resolve exports from a module with the IMAGE_FILE_DLL
bit set in the PE header, i.e. real DLLs. This design won't work under CE.
-- Russ Keldorph russellk@online.microsoft.com (Remove the 'online.' from my address to reach me.) This posting is provided "AS IS" with no warranties, and confers no rights. OR if you wish to include a script sample in your post please add "Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm" -------------------- > From: ledz@argz.com (ledZ) > Newsgroups: microsoft.public.windowsce.platbuilder > Subject: Exporting function from an .exe to be used by loaded .dll > Date: 3 Mar 2004 08:43:22 -0800 > Organization: http://groups.google.com > Lines: 24 > Message-ID: <ef37a2c8.0403030843.1b721cdb@posting.google.com> > NNTP-Posting-Host: 63.227.65.233 > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: 8bit > X-Trace: posting.google.com 1078332202 28997 127.0.0.1 (3 Mar 2004 16:43:22 GMT) > X-Complaints-To: groups-abuse@google.com > NNTP-Posting-Date: Wed, 3 Mar 2004 16:43:22 +0000 (UTC) > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin e.de!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!nntp.gigane ws.com!news.glorb.com!postnews1.google.com!not-for-mail > Xref: cpmsftngxa06.phx.gbl microsoft.public.windowsce.platbuilder:46618 > X-Tomcat-NG: microsoft.public.windowsce.platbuilder > > 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: Andrew: "Re: memory setup issue"
- Previous message: Steve Maillet \(eMVP\): "Re: Event handles in WinCE"
- In reply to: ledZ: "Exporting function from an .exe to be used by loaded .dll"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|