Markmcdade
December 2nd, 1999, 08:30 AM
I'm having trouble passing parameters in VB to a DLL which was created in C.
returned values are ok if no parameters are passed, but the error:
"Bad calling convention"
appears each time I try to pass parameters
my C function header is
MYDLL_API int add(int x, int y)
in VB, I have the line to link to the DLL as
private Declare Function add Lib "mydll.dll" (byval f as Integer, byval s as Integer) as Integer
option Explicit
the function itself contains the lines
txtAnswer.text = add(5,4)
Any Idea?
Thanks for any help.
returned values are ok if no parameters are passed, but the error:
"Bad calling convention"
appears each time I try to pass parameters
my C function header is
MYDLL_API int add(int x, int y)
in VB, I have the line to link to the DLL as
private Declare Function add Lib "mydll.dll" (byval f as Integer, byval s as Integer) as Integer
option Explicit
the function itself contains the lines
txtAnswer.text = add(5,4)
Any Idea?
Thanks for any help.