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.
Does Windows provide some sort of evented API so I can run some code
Share
I am not sure of the API, but you can handle the WM_DEVICECHANGE message.