How to find if parent of USB device is a hub

て烟熏妆下的殇ゞ 提交于 2019-12-12 04:26:13

问题


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


回答1:


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).



来源:https://stackoverflow.com/questions/3834951/how-to-find-if-parent-of-usb-device-is-a-hub

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