C++ – 32 bit application failed to run on x64 Win2003 due to

32-bit64-bitcwindows

Here is my problem:

I have developed an application which can be run on various platforms, including Windows and Unix. This app runs well on pure Win32 box (WinXP) or a pure Win64 (Win2K3 x64 edition) and other unix platforms.

It only fails when running on a 64 bit Win2K3 in 32 bit mode. This app invokes a third party dll at the runtime. And the third party dlls are not formally installed, but just copied to a location in the same env. I'm also sure I'm having the right version of these 3rd party dlls (I mean 32 bit version for 32 bit mode). Even I manually set the "path" in this testing box, it still doesn't work. The app is compiled and built in 32 bit mode in this Win2K3 box.

I run dependency walker and see the same error. Cannot find that 3rd party dll.

Can anyone shed some lights on this? How do I make that 3rd party dll path visible to my app or the system?

Best Answer

I would suggest you to do the following:

  • ensure that you are using 32-bit version of the problematic DLL with 32-bit app
  • use filemon to see what paths your application tries while loading that DLL
  • check whether it works if you place that DLL into one of those paths
  • use dependency walker with that DLL itself - it might have its own unresolved dependencies