|
-
December 2nd, 1999, 09:30 AM
#1
Passing parameters to a C DLL
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|