诸位帮我看看,这个调用API的程序哪里出错?
VC编的API函数:
int Connect(char *hostip,unsigned short Uport)
VB中我作如下处理:
Public Declare Function Connect Lib "d:\a\b\smm.dll" (HostIP As Byte, ByVal Port As Integer) As Long
form中:
Dim str1 As String
Dim psHostip(25) As Byte
Dim psPort As Integer
str1 = "192.168.1.99"
Port = 6300
CopyMemory pszHostIP(0), ByVal (StrPtr(str1)), 25
PROussdconnect = Connect(pszHostIP(0), Port)
执行后,出现:文件未找到:"d:\a\b\smm.dll"的错误,不知道是为什么?