Tech Support > Microsoft Windows > Drivers > Port number on the parent usb hub
Port number on the parent usb hub
Posted by Leen Toelen on February 20th, 2008


Hi,

I am writing aprogram that listens for certain classes of USB devices.
I get the device instance id and device handle, and can traverse the
usb tree back to the root hub. But I need to know on which ports of
the hubs above my device is located. Is there a way for a usb device
to know the port number of its parent on which it is connected?

Regards,
Leen Toelen

Posted by Doron Holan [MSFT] on February 20th, 2008


no, why does it matter?

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Leen Toelen" <toelen@gmail.com> wrote in message
news:80614a4d-e167-4936-9034-5084807bb641@h25g2000hsf.googlegroups.com...

Posted by Uwe Sieber on February 25th, 2008


Leen Toelen wrote:
Check out the USBView sample which comes with the DDK/WDK
and the 'Display USB' sample from Intel:
http://www.intel.com/intelpress/usb/examples/dusbvc.htm

The magic link between the items in the USB API enumeration
and the SetupDi enumeration is the drive key name,
something like
{36FC9E60-C465-11CF-8056-444553540000}\0017

Thru USB API you get it by DeviceIoControl and
IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME as shown in the
USBView sample.
Thru SetupDi you get it by SetupDiGetDeviceRegistryProperty and
SPDRP_DRIVER.


Greetings from Germany

Uwe


Similar Posts