0

我试图在VB.NET中调用 C++ 函数,它会引发 PInvokeStackImbalance。这是 C++ 函数签名:

int e1v151(char *NoUsager, char *SequentielSDU, char *code_sys, int code_for, char *IndGest2)

在这里,在 VB.NET 中:

DllImport("E1fnbase.dll", EntryPoint:="e1v151", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Ansi)>
Public Function e1v151(ByVal NoUsager As String, ByVal SeqSDU As String, ByVal Codesys As String, ByVal CodeFor As Integer, ByVal IndGest2 As String) As Integer
End Function

我已经尝试了一些事情(使用StringBuilder而不是String, <MarshalAs(LPStr)­>)但没有任何成功。有什么我看不到的吗?

4

0 回答 0