I\'m trying to call from C# a function in a custom DLL written in C++. However I\'m getting the warning during code analysis and the error at runtime:
War
CallingConvention.Cdecl means C not C++, so when you have a function with a C++ decorated name, you need to use the decorated name as your EntryPoint or use Extern "C" in The C++ code declaration to turn off C++ name decoration.
CallingConvention.Cdecl
EntryPoint