Windows 7 platform, C#
I use the following statement to list all drives:
DriveInfo[] drives = DriveInfo.GetDrives();
then I can use Dri
I had to check for USB-Devices in an older project and solved it like this:
Win32.DEV_BROADCAST_DEVICEINTERFACE deviceInterface;
deviceInterface = (Win32.DEV_BROADCAST_DEVICEINTERFACE)
string name = new string(deviceInterface.dbcc_name);
Guid g = new Guid(deviceInterface.dbcc_classguid);
if (g.ToString() == "a5dcbf10-6530-11d2-901f-00c04fb951ed")
{*DO SOMETHING*}
I get the GUID and check if the devices GUID is the USB-GUID.