Regarding the Windows platform, is their an event I can look for to tell when a USB drive or any type of portable media us plugged in?
Asked
Active
Viewed 2,268 times
1 Answers
4
You won't get such notifications without first registering for them. Use RegisterDeviceNotification() to do that.
After you have registered your window to receive such notifications, handle the WM_DEVICECHANGE message.

Stefan
- 43,293
- 10
- 75
- 117
-
-1, doesn't work because it's not needed. QUoting the linked MSDN article: "Volume notifications are broadcast to top-level windows, so the function fails if dbch_devicetype is DBT_DEVTYP_VOLUME". USB drives (implementing Mass Storage profile) are volumes. – MSalters Jul 02 '09 at 15:54