Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I format a string for a call to GetProcAddress AP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01030708
Message ID:
01031219
Vues:
15
Thanks Bo,

I had seen a sample declaration that used string and didn't realize I could declare the function using long.

One more question if you don't mind. Is there any way in VFP to execute the function using its pointer. This may have been an exercise in futility for me. GetProcAddress returns a pointer to a function but I can't figure out how to call that function via its pointer. In C, you'd do something like
(*pointervar)(parm1,parm2)
Thanks for your help.

Rodd

>If your going to access the proc name by its ordinal value, just make it a long instead of a string:
>
>
>DECLARE INTEGER LoadLibrary IN kernel32 STRING lpLibFileName
>DECLARE INTEGER GetProcAddress IN kernel32 INTEGER hModule, Long lpProcName
>
>m.handle = LoadLibrary("QuickHash.dll")
>m.pHandle = GetProcAddress(m.handle,154)
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform