Does Windows provide some sort of evented API so I can run some code whenever a drive (say a usb stick) is attached?
Similar to how ReadDirectoryChangesW is for events on the filesystem?
I am not interested only in hardware changes, a user can also mount a volume, a ftp drive or similar.
views:
39answers:
1
+2
A:
I am not sure of the API, but you can handle the WM_DEVICECHANGE message.
Jujjuru
2010-05-27 08:26:19