c# - pinvoke c function - System.BadImageFormatException -
im trying call c function c# im getting badimageformatexception.
here c function header:
extern "c" { __declspec(dllexport) bool validate(char key[]); }
here how im calling c#
[dllimport("mydll.dll")] static extern bool validate(char[] key);
whats wrong here.
when calling native methods, should compile c# code 64 or 32 bit explicitely.
project/properties/build/platform target
Comments
Post a Comment