Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting USB devices
Message
 
À
15/06/2005 09:37:45
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01023469
Message ID:
01023486
Vues:
10
>How can I detect when a USB device is plugged or unplugged?
>
>I'm using the vfp9 examples that bind the windows messages events and I've already tried with WM_DEVICECHANGE and relatives with no success. I'm sure this is a constant too but I don't know what constant is.
>
>Any help
>Thanks
#define WM_DEVICECHANGE 0x0219
m1 = CREATEOBJECT("cTest")
BINDEVENT(0,WM_DEVICECHANGE,m1,"DeviceChanged")
ON KEY LABEL ESC CLEAR EVENTS
READ EVENTS
UNBINDEVENT(0,WM_DEVICECHANGE)

DEFINE CLASS cTest AS Custom

        PROCEDURE DeviceChanged(p1,p2,p3,p4) && I don't know what these 4 parameters are
           WAIT WINDOW "Device Changed" NOWAIT
        RETURN

ENDDEFINE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform