简体   繁体   中英

How to find USB Host Controller by plugged USB device

I need to find USB Host Controller by plugged USB device. I need it to set a specific registry key for that controller which is required to fix KB928631 . I am able to get device handle and get the parent device handle using CM_Get_Parent() function.

Unfortunately, there is no information about number of HUBs, so I don't know how many times CM_Get_Parent() should be called to reach the Host Controller.

Is there any Controller specific data which could be used to differentiate it from HUB?

Currently I am getting CM_DRP_LOCATION_INFORMATION property to and determine whether the string returned by the property started by "PCI bus". If so assume that current device is Host Controller. Is this a reliable solution?

这里 ,我提到“ Enumerator”属性比“ Location”更好。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM