dllimport - Calling a simple VC DLL from VB6 -
I have a simple DLL written with VC6 with a function:
Dllexport int myfunc (long time, using an unsigned char * b, unsigned char * c, unsigned char * d, unsigned char * e) and im Calling it to vb6:
function myfunc lib "mylib.dll" (ByVal as long as string, ByVal string, Byval as string, ByVal E As long as the string). As long as the dim B, the string is dim in the form of a c dimension as the string dim dimension as long as the string dim R R = myfunc (a, b, c, d, e) Im getting "bad dll calling conference" error but I do not know why any thoughts?
Generally speaking, 'bad DLL ...' means what it means.
Try adding __stdcall to the C function prototype and see what happens.
Comments
Post a Comment