在vc里编了一个简单的dll文件:dlltest.dll。其中只有一个简单的全局函数:int Test(int x)。{x=x+100; return x;}
然后在vb里调用:
Private Declare Function Test Lib "d:\a\dlltest.dll" (ByVal x As Long) As Long
dim y as long
Private Sub Command1_Click()
y=100
MsgBox Test(y), vbOKOnly
End Sub
运行后警告说:Bad dll calling convention!
哪位大侠给指点一下,谢谢!
如果用过,给个简单的例子参考一下也好呀 ?