这个vc写的dll在vb里该如何调用?

2025-01-03 12:39:36
推荐回答(2个)
回答1:

在VB里这样声明:
Private Type guid
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(7) As Byte
End Type

Public Declare Function CreateCSocket Lib "DLLNAME.dll" Alias "_CreateCSocket@8" (ByRef Guid As guid, ByVal dwInterfaceVer As Long) As Long

什么是GUID ,看这里:http://baike.baidu.com/view/185358.htm
CreateCSocket返回的是一个32位的指针(void *)

回答2:

首先,你的DLL不能是扩展DLL。

其次,通用的DLL不分啥语言写的,调用同调用其它类型的DLL