Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use joyGetPos
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01560907
Message ID:
01560910
Vues:
66
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform