I have exported two C++ functions into a dll.
int getNumber1(){return 9;};
int getNumber2(int a){return a;};
VB Code:
'Declaration Public declare function getNumber1() Lib "C:\Link5.dll" () as Long Public declare function getNumber2() Lib "C:\Link5.dll" (Byval a as Long) as Long 'Usage Msgbox (getNumber1) Msgbox (getNumber2(5))
The program displays a msgbox with number 9 as returned by the first function. But the 2nd statement produces an error "Bad DLL calling convention".
What seems to the error here?




Reply With Quote