我有一个用 VC6 编写的简单 DLL,具有一个功能:
__declspec(dllexport) int myfunc(long a, unsigned char *b, unsigned char *c, unsigned char *d, unsigned char *e)
我使用以下命令从 vb6 调用它:
Declare Function myfunc Lib "mylib.dll" (ByVal a As Long, ByVal b As String, ByVal c As String, ByVal d As String, ByVal e As String) As Long
....
dim a as long
dim b as string
dim c as string
dim d as string
dim e as string
dim r as long
r=myfunc(a,b,c,d,e)
我收到“错误的 dll 调用约定”错误,但我不知道为什么。有任何想法吗?