私はVC6で書かれた単純なDLLを1つの関数で持っています:
__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呼び出し規約が正しくありません」というエラーが表示されますが、その理由がわかりません。何か案は?