如何查找USB设备的父级是否为集线器 [英] How to find if parent of USB device is a hub
问题描述
我需要确定USB设备的父级是集线器还是主机。
当前计划是使用CM_Get_Parent()获取DEVINST并使用SetupDiGetDeviceInfoListDetail()获取SP_DEVINFO_LIST_DETAIL_DATA结构,但是从那里我正在寻找信息来解析,将告诉我父级是否是集线器。 / p>
非常感谢任何指针/提示/建议。
$ b
EB
可能是根集线器或外围集线器,我想这就是你想知道的。检查祖父母的枚举属性(是否在 USB
或 PCI
总线)。
I need to find out if parent of USB device is a hub or host. Current plan is to use CM_Get_Parent() to get the DEVINST and use SetupDiGetDeviceInfoListDetail() to get the SP_DEVINFO_LIST_DETAIL_DATA structure, but from there I am looking for information to parse against to will tell me if the parent is a hub.
Any pointers/hints/advice would be greatly appreciated.
Thanks in advance,
EB
Parent is always a hub. Might be a root hub or a peripheral hub, I guess that's what you want to know. Check the grandparent's enumerator property (whether it's on a USB
or PCI
bus).
这篇关于如何查找USB设备的父级是否为集线器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!