天天看點

Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in 解決方案

because regular C functions work differently than the Windows API functions; their "calling conventions" are different, meaning how they pass around parameters is different. (This was hinted at in the error.)

是以請在C#中 使用<code>CallingConvention = CallingConvention.Cdecl),代碼如下:</code>