Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arcade Game Written in VFP
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00531577
Message ID:
00531685
Views:
27
>Thanks George!
>
>What I was wondering is if I can do something similiar using WINAPI calls in VFP? I saw some threads where others have done API calls through VFP but I'm wondering if ALL the API calls are available and what kinds of grammatical difference there are.
>
>Regards!

Sure thing, Kevin.

What can't you call? Anything that requires that you pass the address of a callback function. This is usually fairly easy to determine by the C datatype (something like HCALLBACK, usually).

What's tough to call? Any structure that requires an embedded pointer to a datatype (most often a string). In the structure definitions you'll see the member define with the prefix "LP". This would require that you use something like Ed Rauh's ClsHeap or Christof Lange's Structures programming (or something similar) to allocate and de-allocate the pointers. Both of these are in the download section.

What's a pain to call? Structures with a lot of members, most of which are integers. You have to simulate the struct with a string convert values back and forth, etc. There are a number of programs here in download section, including some by me, that do this.

Other than those that are covered by the first item, everything else is pretty much fair game.

The most common mistake is forgetting that the declaration is case sensitive. What I do is copy the declaration from the Platform SDK and convert it. This helps me avoid this problem (but I still sometimes make it when I try to write a declaration off the time of my head and don't quite remember the case right< s >). I keep the variable names in the declaration because it helps me remember what the parameters are.

Does this cover it?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform