visual c++ - use vc++ class library in c# -
I have created a simple "public ref class" in the vc ++ project, which was configured to create a dynamic library is. In the C # project (Simple Console Application) I added the vc ++ project as reference and using the "myv ++ library". But when I try to create an object from vc ++ dll, I always get: System.BadImageFormatException unused
Any clues or helpful tutorials on this?
TIA
Is your C # project ready for "no CPU" - If it is, and you are on the 64-bit OS, the load will fail.
The VC ++ DLL will only be 32-bit, and the 64-bit app can not turn it on.
You can change your C # build to target x86 instead.
Comments
Post a Comment