USB notification
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
-
I am looking for a way to get Windows to notify my application when a new USB device is attached or detached from the system. The ideal solution would be a callback method of some kind, but a small low overhead polling loop could also work. Thank you.
Windows sends a (rather, a few) WM_DEVICECHANGE message to all top level windows when *anything* in the device list changes. You can also register for notifications for a specific device class, usign RegisterDeviceNotification() Note: There's a bug in Win98 that makes UnregisterDeviceNotification crash.
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen