views:

184

answers:

2

Hello-

I have some COM and some native dlls that are compiled for a Win CE device that I have. I would like to take a look at them, so I can create an application that references them and extends the functionality of some programs already on the device. When I open them with the Dependency Walker or Visual Studio 2008, both tell me that they are invalid DLLs. However, I'm fairly certain they are not corrupted, as I extracted them from the ROM of the device along with other files (bmps and the like) that are not corrupted. So I'm asking- are WinCE dlls fundamentally different than win32 dlls, and as such vs and depends is not reading them correctly? Or is something else going on?

Thanks

A: 

They are likely not corrupted, but tools that expect x86 images (as opposed to ARM, MIPS, etc) may give that misleading error when they encounter images compiled for a different processor. There are many similar tools which may help (PEDump and PEBrowsePro come to mind) scattered around the net, and since the PE format is portable (hence "portable executable"), one of them is bound to work.

In addition, some devices protect executables in ROM from being copied. It's possible the device corrupted your files on purpose when you copied them. A quick look in a hex editor should reveal this.

zildjohn01
Thanks for your help, I'll try out some of those you mentioned.
hairchrm
A: 

Dependency Checker will work with WinCE DLLs (I've used this quite often myself). You can expect to get errors reported about missing dependencies, because Dependency Checker won't know where to find Coredll.dll & possibly the MFC DLLs because they aren't the same as the desktop ones. Once you educate Dependency Checker you can resolve these links too.

Otherwise, zildjohn01 is right that you sometimes can't copy executables or DLLs from the ROM of a WinCE device. It depends how the OS image is made: if the DLLs or EXEs are included as "MODULES" rather than "FILES" then you cannot copy them back off.

AAT
Thank you for your help. The files were modules, actually, which might explain why they were not working. I had to extract them out of the firmware update I had for my device, and do some conversions to make them into dlls. Do you know of a way to open/explore WinCE modules? Can they be converted/compiled to a dll? If it helps, I originally had the raw module (with the s0000, s0001, etc) files and I used recmod (recompile module) to compile it into a dll, which I thought would yield a working dll... I guess not? Any ideas from past experience?
hairchrm
@hairchrm - can't really help you here I am afraid, I don't know enough about recmod or whether it creates valid DLLs (I've not used it).
AAT