Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CallFn Problems
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00005081
Message ID:
00005094
Vues:
51
>I have a DLL file that must receive 4 input parameters (all Character) and return 1 parameter (characters) but when i do:
>
>FuncHandle=RegFn(1,"@C@C@C@C,"C","MYDLL.DLL")
>=CallFn(FuncHandle,"myparm1","myparm2","myparm3","myparm4")
>
>the program make an illigal operation and y must close fox and start over.

>What is wrong?

Gee, a lot of things in this world are wrong. But I don't know what's causing problems in your program... =)

Are you using Visual FoxPro? If not, does this version of FoxPro you're using support Windows .DLLs? If so, is this .DLL a valid Windows .DLL?

Where'd you get RegFn() and CallFn (Sorry, I'm only familiar with VFP)? I assume here that these are helper functions that you're using. If so, try looking inside the code of these two and figuring out where exactly the error happens.

If you can't do that or you just can figure out RegFn() and CallFn(), I suggest using DECLARE-DLL for VFP.

Well one thing I'm sure of is that you're supposed to check the return value of RegFn() before using it with CallFn(). This is basic solid programming practice, dude.

It IS possible for RegFn() to fail and return an illegal value. Using this illegal value with CallFn() is almost always guaranteed to screw up.

Hope this helps!
alistair israel
Distressed DBA, Sleepy SysAd, Weary WebMaster (aka Senior Software Engineer)
aisrael@poboxes.com
Makati City, Philippines
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform