How to find if parent of USB device is a hub

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

Answers


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


Need Your Help

Update Text in Combobox on Visual Studio C#

c# visual-studio-2012 combobox insert-update

I have a problem on update text in my Combo Box. I have the data on my combo box but if the data is not available, I want to type it by my self. How can I do that?

What's the best way to communicate between view controllers?

objective-c iphone cocoa-touch delegates key-value-observing

Being new to objective-c, cocoa, and iPhone dev in general, I have a strong desire to get the most out of the language and the frameworks.