>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)
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.