Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I format a string for a call to GetProcAddress AP
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01030708
Message ID:
01031219
Views:
16
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)
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform