Weird DLL problems: Windows Mobile 2003 Second Edition/eVC4 SP3
From: Guy (guy691us_at_yahoo.com)
Date: 07/10/04
- Next message: Jonathan: "Date Manipulation"
- Previous message: Mateusz Łoskot: "Re: I made it!"
- Messages sorted by: [ date ] [ thread ]
Date: 10 Jul 2004 10:50:30 -0700
Hi,
I have a small MFC app here that works fine on anything from PPC2000
to PPC2003, but when launched under PPC2003 (Windows Mobile 2003)
Second Edition, reports the following error:
"Cannot find 'MyApp' (or one of its components). Make sure the path
and filename are correct and all the required libraries are
available."
So, I analyzed the MyApp.exe dependencies using the Dependency Walker,
and the list is as follows:
System:
coredll.dll
mfcce300.dll
olece300.dll
Custom:
myappmodule1.dll
myappmodule2.dll
Also, I wrote a test program to LoadLibrary() each one of the
dependencies to see if I can get more information about HINSTANCE
value and GetLastError(). The results are as follows:
LoadLibrary on coredll.dll returns a valid HINSTANCE and 0.
LoadLibrary on mfcce300.dll returns a valid HINSTANCE and 0.
LoadLibrary on olece300.dll returns a valid HINSTANCE and 0.
LoadLibrary on myappmodule1.dll returns -2053706016 and 126 ("Module
not found").
LoadLibrary on myappmodule2.dll (dependent on myappmodule1.dll)
returns 0 and 1114 ("A dynamic link library (DLL) initialization
routine failed.")
Weird, I thought, so I performed the following three tests:
1.) Removed the myappmodule2.dll dependency on myappmodule1.dll.
LoadLibrary on myappmodule2.dll returns -2053706016 and 126 ("Module
not found").
2.) Added a test for a non-existing library, kaboom.dll. LoadLibrary
on kaboom.dll returns 0 and 126 ("Module not found").
3.) Added a test with a "minimum" 7Kb wizard-based embedded Visual
Studio 4.0 SP3 MFC DLL. LoadLibrary on wizmodule.dll returns
-2053706016 and 126 ("Module not found").
The above leads me to believe the following:
a.) Each one of the dependent libraries, myappmodule1.dll and
myappmodule2.dll - IS - on the PDA device, and the dynamic loader is
able to find them, physically.
b.) Each one of the dependent libraries encounter some kind of error
condition, since attempting to load a non-existing kaboom.dll library
returns 0 as the library HINSTANCE (per documentation) and the error
code of 126 ("Module not found"). Attempting to load one of the
"offending" libraries returns -2053706016 as the library HINSTANCE
(whatever that means), and 126 ("Module not found").
c.) The problem is not the standard failure of initialization. In such
case the returned library HINSTANCE was 0 (per documentation), with
the 1114 error code ("initialization routine failed").
d.) The problem is likely not related to DLL sub-dependencies. Even a
very basic MFC DLL created with eVC 4.0 SP3 shows the same problem.
Again, the same code works perfectly well on any other version of
Windows Mobile.
Anyone has any idea what the -2053706016 (0xFFFFFFFF8596EEE0 hex,
2241261280 unsigned) returned as HINSTANCE means??
Thanks,
G.
- Next message: Jonathan: "Date Manipulation"
- Previous message: Mateusz Łoskot: "Re: I made it!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|