another simple question
hi there,thanks for everyone,i have another question...
i have a function in a dll( i wrote the dll using c++),and i need to call this function from VB program..
the function in the dll is:
_declspec (dllexport) char *buff()
i used this in the vb module:
Declare Function buff Lib "d:\dddd.dll" Alias "?buff@@YAPADXZ" () As long
and this in the project:
Private Sub Command3_Click()
k = buff
Print "k=" &k
but i got the folowing strange result
what is wrong
not sure if this is in the right forum and I don't really know VB but I think that VB requires PASCAL calling convention. This means that you should use __stdcall or __cdecl
Yes I believe you are correct. All BASICs use the PASCAL calling convention - MS seems obsessed with PASCAL calling convention - I'm sure there is good reason for it but still.