drcc
drcc

Reputation:

C/C++ USB drive event

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?

Upvotes: 3

Views: 2347

Answers (1)

Stefan
Stefan

Reputation: 43575

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.

Upvotes: 4

Related Questions