Detect when an usb device is inserted or removed.
Normally the autorun in usb storage devices like pendrives is disabled for security reasons, so i wrote a little utility in c++ to launch a custom application in my pendrive when I insert it in a usb port.
Normally if you want to detect when a “hotplug” device has been inserted or removed from your system, you have to intercept the system message “WM_DEVICECHANGE” in “WndProc” function of the main window of your application.
Continue Reading »
30 May 2007 inandrea 0 comments


