What USB devices (friendly name) are currently connected to PC?

落花浮王杯 提交于 2019-12-21 19:42:08

问题


Can I get a list of what devices are currently connected to the computer?

I checked this and this thread, but I can't seem to find the actual names (i.e. iPod Touch 4 etc.) is there a way to find the name of the device in human language, so I can display this list (of matching devices) to the user?

Any PI that gets this info?

Update: I notice that the computer's device management is able to show this info, meaning it does exist somewhere, I just don't know the right place to access it.

I did found this info in the registry, but there is some inconsistency between the "Mighty Drive" and the "iPod", I'm looking for a reliable reg. key to seek for this info.


回答1:


Device Manager shows the first "Display Name" property associated with a particular device. You can get that information using SetupDiGetDeviceRegistryProperty with, I believe, the SPDRP_FRIENDLYNAME property.



来源:https://stackoverflow.com/questions/7314257/what-usb-devices-friendly-name-are-currently-connected-to-pc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!