Currently how I do this is I poll for a masked list of USB devices (masked specifically for the device I'm working with) and if it's there, I continue, if not then I notify the user that the device is not connected. The method for getting a list of USB devices is provided for me through a USB peripheral controller chip manufacturer's .NET library.
Is there an event somewhere for a USB device disconnect?
Open the extracted folder and double-click on 'USBDeview.exe' file to run it. A new USBDeview program window will open. You can see the list of all the USB devices that are connected to your PC. ⚪ The Gray dot beside the device name means the device is not connected.
USB EVENTS cater for Children's Parties, Weddings, Schools, Galas, Fetes & Fun Days, We have full public liability insurance. All castles have up to date test certificates and are tested and we are members of BIHA.
USBDriveLog is a tool for Windows 10 and Windows 11 that displays a log of all USB drives plugged to your computer. For every USB drive event, the following information is displayed: Device Model, Revision, Manufacturer, Serial Number, Plug Time, Unplug Time, Device ID, Device Capacity, and more...
I ended up using this: http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx
And followed this: http://www.codeproject.com/KB/system/DriveDetector.aspx
have you checked out the Win32_USBControllerDevice class? http://msdn.microsoft.com/en-us/library/aa394505(VS.85).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With