关于vb.net2010调用c++编的dll
结果能运行,但调试说有故障”对PInvoke函数“Test2!Test2.Form1::add”的调用导致堆栈不对称。原因可能是托管的PInvoke签名与非托管的目标签名...
结果能运行,但调试说有故障”对 PInvoke 函数“Test2!Test2.Form1::add”的调用导致堆栈不对称。原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配。请检查 PInvoke 签名的调用约定和参数与非托管的目标签名是否匹配。“为什么?(c++中用__stdcall则程序说找不到函数)
展开
1个回答
展开全部
试试这个:
<DllImport(\"Data.dll\")> Private Shared Function ConnectPlayServer(ByVal Address As String, ByVal Port As Integer, ByVal DataPort As Integer, ByVal Username As String) As Boolean
End Function
Private Declare Auto Function a Lib \"Lib.dll\" (ByVal i As Integer) As String
希望能解决您的问题。
<DllImport(\"Data.dll\")> Private Shared Function ConnectPlayServer(ByVal Address As String, ByVal Port As Integer, ByVal DataPort As Integer, ByVal Username As String) As Boolean
End Function
Private Declare Auto Function a Lib \"Lib.dll\" (ByVal i As Integer) As String
希望能解决您的问题。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询