Reputation: 5463
I have a C++ Class Library and an Windows application in C# using the library.
It works great on 32-bit Windows, but not on 64-bit Windows - BadImageFormatException
occured.
I tried to change the platform of the C++ Class Library, however it can not changed to WIN64 from WIN32.
I think that one of the following questions can solve this problem.
Upvotes: 1
Views: 627
Reputation: 121991
Is there a way to convert WIN32 Library to WIN64 Library?
Rebuild (recompile) the library as a 64-bit library.
Is it possible to load WIN32 Library in 64 bit application?
No. From Programming Guide for 64-bit Windows:
... 32-bit processes cannot load 64-bit DLLs for execution, and 64-bit processes cannot load 32-bit DLLs for execution.
Upvotes: 4