Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use joyGetPos
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01560907
Message ID:
01560910
Views:
65
lcjoyinfo=replicate([ ],4)
The above statement allocates only 4 bytes, which is not sufficient for the JOYINFO structure:
typedef struct {
  UINT wXpos;
  UINT wYpos;
  UINT wZpos;
  UINT wButtons;
} JOYINFO;
Since the structure consists of four 4-byte unsigned integers, the statement should change to
lcjoyinfo = REPLICATE(CHR(0), 16)
Generally CHR(0) is a cleaner way of populating the buffer rather than stuffing it with the spaces (CHR(32)). For this API call this is probably not important, but for many others it is.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform