vb.net如何引用C++写DLL文件?及函数的调用方法?
C++函数如下:boolwinapiconnectplayserver(char*address,DWORDPort,DWORDDataPart,char*Usernam...
C++函数如下:
bool winapi connectplayserver
(
char* address,
DWORD Port,
DWORD DataPart,
char* Username
); 展开
bool winapi connectplayserver
(
char* address,
DWORD Port,
DWORD DataPart,
char* Username
); 展开
展开全部
试试这个:
<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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询