I'm not a VB Expert, but I would like to know what the hell is the error here.

My C++ DLL is declared this way:


extern "C" __declspec(dllexport) int PublishPDF(int Version, LPSTR source, LPSTR destination, int delai);




And my VB declare is:


private Declare Function PublishPDF Lib "PubPDF" (byval Version as Integer, byval Source as string, byval Destination as string, byval Delay as Integer) as Integer




And Visual Basic returns me a "bad calling convention" error (runtime error #49).. this is only happening at design time.

Thank you in advance, I'm lost here...!



---
Nicolas LeBlanc
Software Engineer
Ordiplan Inc.