tags:

views:

65

answers:

1

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  A: 

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

Ben Voigt
Thanks for the advice, I am finding that I need to make similar calls to what what is done in the USBView sample application from the WDK. So naturally I am running into linking issues as I need to do this from a user mode library/application... error LNK2001: unresolved external symbol _GUID_DEVINTERFACE_USB_HOST_CONTROLLER and adding the libraries used by USBView does not resolve the link error.
echobravo
That looks to me like a header file problem, not a library link problem. This may be relevant: http://support.microsoft.com/kb/130869
Ben Voigt