문제

I am working on USB devices and can identify a usb device. But I have a theoretical question.Is it shows any usb device like portable cd drive or specifically flash drives? I could nt check all possibilities due to lack of these hardwares :). Is there any method to identify if it is a flash drive or another usb device.

Please don't beat with what you have tried. I googled regarding same but because of my least experience I couldn't find any.

Thanks

도움이 되었습니까?

해결책

Please use the class USBSerialNumber

USBSerialNumber usb = new USBSerialNumber();
string serial = usb.getSerialNumberFromDriveLetter("f:\");
MessageBox.Show(serial);

Each pendrive has serial number which is unique.

You can use this class for this purpose.

Download it from following link:

http://www.cfdan.com/posts/Retrieving_Non-Volatile_USB_Serial_Number_Using_C_Sharp.cfm

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top