I adopted a code base that I need converted to 32-bit (so I can use an external 32 bit driver). I set the project Platform Target to x86 (picture below). It all compiles fine, but for some reason at run time it crashes and produces the following output An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
.
I used Dependency Walker, and found out that some of the DLLs linked in are 64 bit, located in \System32\ when I want the 32 bit DLLs located in "SysWOW64". (Ouptut Below). You can see from the output that the directories are incorrect, and that they are indeed 64 bit DLLs. I thought this was all managed by windows?
So my question is, how do I force the application to go to the 32 bit DLLs in \SysWOW64\? Is this a windows configuration setting or a project setting? Or how can I diagnose the problem further?