Is there a way to read USB device serial number and data in a text file in USB using visual studio 2005?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Try this:
Here's the internals for the USBSerialNumber class:
Source: http://www.cfdan.com/posts/Retrieving_Non-Volatile_USB_Serial_Number_Using_C_Sharp.cfm
Matt answer is almost right, but you must pass drive letter without back slash in function: string serial = usb.getSerialNumberFromDriveLetter("f:");
Or, you can do it with much less code, here's the sample: