Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Declare dll call caused an exception
Message
De
24/01/2005 14:01:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP2
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
00979001
Message ID:
00980129
Vues:
74
Hello,

"declare integer BUICScan in BUICAP32.DLL integer iJobType, ;
string lpFront, LONG *lplLenFront, ;
string lpBack, LONG *lplLenBack, ;
string lpCode, integer *lpiLenCode"

this declaration is a mix betwenn FoxPro & C syntax ??!!

a C declaration looks like:

int _stdcall BUICScan(int iJobType, char *lpFront, long *lplLenFront,
char *lpBack, long *lplLenBack, char *lpCode, int *lpiLenCode);

if this is the correct declaration (which i can only guess from what you've provided)

the correct translation would be:

DECLARE INTEGER BUICScan IN BUICAP32.DLL ;
INTEGER iJobType, ;
STRING @ lpFront, ;
INTEGER @ lplLenFront, ;
STRING @ lpBack, ;
INTEGER @ lplLenBack, ;
STRING @ lpCode, ;
INTEGER @ lpiLenCode

and the calling syntax would be:

LOCAL lcFront, lnLenFront, lcBack, lnLenBack, lcCode, lnLenCode, lnRetVal

STRORE SPACE(255) TO lcFront, lcBack, lcCode
STORE 255 TO lnLenFront, lnLenBack, lnLenCode

lnRetVal = BUICScan(theJobType,@lcFront,@lnLenFront,@lcBack,@lnLenBack,@lcCode,@lnLenCode)

Regards
Christian
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform