I have exported two C++ functions into a dll.

int getNumber1(){return 9;};
int getNumber2(int a){return a;};




VB Code:
  1. 'Declaration
  2. Public declare function getNumber1() Lib "C:\Link5.dll" () as Long
  3. Public declare function getNumber2() Lib "C:\Link5.dll" (Byval a as Long) as Long
  4.  
  5.  
  6. 'Usage
  7. Msgbox (getNumber1)
  8. 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?