I would like to port a DLL that was compiled for Windows Embedded Compact 7 into a Windows CE 5.0 / 6.0 environment. I'm fairly certain the target assembly language is compatible but from my experimentation it appears that there is something fundamentally different about the DLL's in WEC 7 than in WCE 5. Does anyone know what specifically is different about how the DLL's are compiled in WEC 7 than in WCE 5/6?
-
By the way, this is an unmanaged C++ DLL (no .NET). – Paul Berland Feb 05 '18 at 23:20
-
Also the program "runs" under WCE 5, but locks up with no error message. If it was a name mangling or dependency issue I would have expected the DLL or program not even to load, as it did before I had the dependencies correct. – Paul Berland Feb 05 '18 at 23:26
1 Answers
I'm assuming the source code for this dll is not available, which could make it difficult to use on earlier versions of Windows CE.
Newer versions of CE have added security features to the CRT library, so if the dll depends on any of those, it would not run on earlier versions.
Besides the target architecture, the OS images would also have to be built using a similar set of OS/SYSGEN features, or, again, the dll might fail to load or run if those dependencies are not satisfied.
The dll could be attempting to dynamically load other dll's, or could be relying on OS behaviour specific to CE 7.0.
In short, a potentially very difficult task without the source code.
A way to get started would be to use the Microsoft dumpbin
tool with the /imports
option to produce a list of dll's and entrypoints that the dll depends on. Similarly, use dumpbin /exports
on the earlier builds of Windows CE that you want to use the dll on, to see what entrypoints are available, and work from there.
Another approach, in case you have access to Platform Builder and are able to generate OS images yourself, would be to use the kernel debugger to examine what happens when the dll is loaded.

- 1,508
- 2
- 21
- 27
-
Thanks Carsten! I will try some of these ideas and let everyone know how well it went. – Paul Berland Feb 12 '18 at 17:08
-
1I used the dumpbin /import utility to find the dependencies. The dependencies were the same ones I deduced by observing the build output from Platform Builder 5.0. I am sure that the dependencies are present. In fact, I know that one of the dependencies (by matching the ordinal number from "crt_ordinals.h") is "__security_gen_cookie2" which is a function that is not present in WCE 5. But i took the function from WEC7 and added it to coredll.dll and recompiled coredll.dll so now this function is present in WCE 5. But even with all dependencies resolved, it locks up. Next I may try KITL. – Paul Berland Feb 22 '18 at 20:40