RE: 193 Is not a valid application. ERROR_BAD_EXE_FORMAT
From: Russ Keldorph [MS] (russellk_at_online.microsoft.com)
Date: 03/03/04
- Next message: Bob: "Re: Event handles in WinCE"
- Previous message: Maxim S. Shatskih: "Re: Event handles in WinCE"
- In reply to: ledZ: "193 Is not a valid application. ERROR_BAD_EXE_FORMAT"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 03 Mar 2004 19:25:35 GMT
Can you send two things?:
1) the windows CE target type you are using when building the image, i.e.
x86, ARMV4, ARMV4I, etc.
2) the output of 'dumpbin /headers foo.dll' where foo.dll is the name of
the DLL you're passing to LoadLibrary.
For 2), I just need the FILE and OPTIONAL headers. You can omit the
SECTION headers.
Generally, this error is caused by a mismatch in the header values of the
DLL and what the OS can load. Another cause is missing exports from other
DLLs your DLL depends on, like COREDLL. In this common case, you should
see a message to this effect in the debug output, though. There are other
causes, especially actual corrupt file formats, but these are less common
if you built with the normal build system.
-- 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: 193 Is not a valid application. ERROR_BAD_EXE_FORMAT > Date: 2 Mar 2004 15:01:34 -0800 > Organization: http://groups.google.com > Lines: 28 > Message-ID: <ef37a2c8.0403021501.1d01d571@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 1078268495 23043 127.0.0.1 (2 Mar 2004 23:01:35 GMT) > X-Complaints-To: groups-abuse@google.com > NNTP-Posting-Date: Tue, 2 Mar 2004 23:01:35 +0000 (UTC) > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin e.de!news-lei1.dfn.de!news-fra1.dfn.de!news2.telebyte.nl!news.glorb.com!post news1.google.com!not-for-mail > Xref: cpmsftngxa06.phx.gbl microsoft.public.windowsce.platbuilder:46567 > X-Tomcat-NG: microsoft.public.windowsce.platbuilder > > I'm developing an application for CE.net 4.2 that supports a simple > plug-in architecture. > > The .exe exports some functions and then can load the various plugins > (.dlls) that can then use those exported functions. > > So app.exe starts up and the calls LoadLibrary(dllName) to load the > plugins. > > My code base compiles on XP (VC6) and CE (EVC4). > > It works as expected on XP but on CE LoadLibrary() returns NULL and > GetLastError() is reporting 193 ERROR_BAD_EXE_FORMAT. Note that I'm > testing in the emulator for my particular platform SDK and have not > tried this on the actual hardware (don't have it yet) but I'd expect > the same outcome. > > I have no idea why I get this error or what it means since the .exe is > already loaded and started I don't see how it can have a bad format. > In fact, if I skip trying to load the .dll file the .exe loads and > runs fine. > > I can't find any good information on this error and this is a major > show stopper in the development of my application. > > Any help greatly appreciated. > > Regards. >
- Next message: Bob: "Re: Event handles in WinCE"
- Previous message: Maxim S. Shatskih: "Re: Event handles in WinCE"
- In reply to: ledZ: "193 Is not a valid application. ERROR_BAD_EXE_FORMAT"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|