I\'m Using C# WPF. I have a C++ test dll as follow: .h:
extern \"C\" __delspec(dllexport) void TestMethod();
.cpp file:
This seems to be 32bit/ 64 bit problem. Seems like your C++ dll and C# calling assembly are built for different platform targets. Try compiling both for the same platform (either x86 or x64) and then calling the function.
32bit/ 64 bit