2015-01-09 59 views
1

有没有使用C#识别设备和关联的子USB设备的方法?例如,我有一台安装了读卡器的USB Zebra打印机,并希望知道读卡器的名称和识别细节,即构建相关设备的树状结构。识别相关的USB设备

 
USB Zebra Printer 
---> USB Card Reader Name 

使用Powershell脚本我可以看到我感兴趣的设备;

 
gwmi Win32_USBControllerDevice |%{[wmi]($_.Dependent)} | 
Sort Manufacturer,Description,DeviceID | 
Ft -GroupBy Manufacturer Description,Service,DeviceID 

这是输出;

Powershell Output

的Windows显示在打印机属性信息;

Windows USB device tree

+0

[智能卡读取器的命名(HTTP的可能重复:// stackoverflow.com/questions/24612817/smartcard-reader-naming) – Lankymart

+0

这可能也有用 - http://stackoverflow.com/questions/6940824/getting-pcsc-reader-serial-number-with-winscard – Lankymart

回答