stdcall calling convention and using pinvoke in C#
问题 I created a DLL file which includes two empty functions below. extern "C" __declspec(dllexport) void __stdcall myFunc1() { // just empty function } extern "C" __declspec(dllexport) void __cdecl myFunc2() { // just empty function } In C#, I could call the functions using DLLImport attribute like below. [DllImport("myDLL", CallingConvention=CallingConvention.StdCall)] private extern static void myFunc1(); [DllImport("myDLL", CallingConvention=CallingConvention.Cdecl)] private extern static void