Hello:
Sorry for the long post.
We have a COM component, which uses MFC (for the UI side of things) and
ATL (for the COM side of things). This is loaded/instantiated from an
EXE which does not use MFC. If the device is already running (i.e
booted up), and we try and run the EXE, the DLL seems to load fine. And
run fine. (i.e we are able to get to the classes and interfaces that we
need).
However, we also have a CE Service - which does not use MFC - spawning
off the above EXE on device startup. In this scenario however, when the
EXE tries to load this DLL (using either LoadLibrary() or
CoCreateInstance()), the device never boots up. It freezes, and the
only solution to fix the problem is to hard reset the device. We found
that the CoCreateInstance or the LoadLibrary() never returns.
We tried creating a dummy dll using ATL (for COM), but no MFC, and that
seems to be loaded fine on device startup. When MFC is added to this
same DLL, the problem starts happening. i.e the DLL cannot be loaded.
However, this problem vanishes on Windows Mobile 5.0 (device being a
Qtek 9100); the DLL that uses MFC is loaded perfectly fine, and works
like clockwork. However, we need to get this darn thing working on
Pocket PC 2003.
Has anyone seen this problem before or some similar problem before? Any
help would be greatly appreciated.
Here are some data points:
- The DLL uses both MFC and ATL. Statically links to both.
- OS is Pocket PC 2003.
- Device is O2 Xda II.
- DLL is compiled with Visual Studio 2005
- EXE is compiled in EVC++4, SP2.
- EXE does not use MFC
Apologies if I have missed anything. Feel free to badger.
Cheers!
Narayan