解決方案:c++
[DllImport("Dll.dll")]改成[DllImport("Dll.dll", CallingConvention=CallingConvention.Cdecl)]
DllImport的CallingConvention的屬性,默認值是CallingCovention.Stdcall, 此處更改爲Cdecl(c/c++默認調用方式)spa
---------------------
做者:徐鳳竹
來源:CSDN
原文:https://blog.csdn.net/xfz0330/article/details/51477769
.net