DevicePath from USB hub and port

Looking to get the Device Path of a USB device when I have a handle to the

USB hub (CreateFile on the DevicePath of the hub)) and the index of

the port where the device is inserted.

Any way to get it?

Thanks!

Regards,

L Nicula

No way to do this from the parent. A handle to the child device makes sense only if you know how to talk to the driver (ie read, write, IOCTL codes, etc) which is identified as the device interface (guid). if you know the device interface already, query on that. You can find the parent device from the instance if you so choose. All of this is from user mode.

What problem are you trying to solve and in user or kernel mode?

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 11:37 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] DevicePath from USB hub and port

Looking to get the Device Path of a USB device when I have a handle to the

USB hub (CreateFile on the DevicePath of the hub)) and the index of

the port where the device is inserted.

Any way to get it?

Thanks!

Regards,

L Nicula


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi,

This is all user mode, btw.

I will not use the device path to talk to the device directly, I am using it as a unique ID to positively identify this device later in other module in a list of other device paths obtained independently of my code.

So I have the hub and port and I can talk to the hub to ask for device properties, any chance to get the device path or even the device instance ID?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 11:46 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] DevicePath from USB hub and port

No way to do this from the parent. A handle to the child device makes sense only if you know how to talk to the driver (ie read, write, IOCTL codes, etc) which is identified as the device interface (guid). if you know the device interface already, query on that. You can find the parent device from the instance if you so choose. All of this is from user mode.

What problem are you trying to solve and in user or kernel mode?

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 11:37 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] DevicePath from USB hub and port

Looking to get the Device Path of a USB device when I have a handle to the

USB hub (CreateFile on the DevicePath of the hub)) and the index of

the port where the device is inserted.

Any way to get it?

Thanks!

Regards,

L Nicula


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:>

You can use the config manager (CM_Xxxx) APIs to walk the tree and find child devices. You can get the device instances from those children as well. What you can’t do is correlate the child stack to a particular port number on the parent.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 12:06 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] DevicePath from USB hub and port

Hi,

This is all user mode, btw.

I will not use the device path to talk to the device directly, I am using it as a unique ID to positively identify this device later in other module in a list of other device paths obtained independently of my code.

So I have the hub and port and I can talk to the hub to ask for device properties, any chance to get the device path or even the device instance ID?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 11:46 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] DevicePath from USB hub and port

No way to do this from the parent. A handle to the child device makes sense only if you know how to talk to the driver (ie read, write, IOCTL codes, etc) which is identified as the device interface (guid). if you know the device interface already, query on that. You can find the parent device from the instance if you so choose. All of this is from user mode.

What problem are you trying to solve and in user or kernel mode?

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 11:37 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] DevicePath from USB hub and port

Looking to get the Device Path of a USB device when I have a handle to the

USB hub (CreateFile on the DevicePath of the hub)) and the index of

the port where the device is inserted.

Any way to get it?

Thanks!

Regards,

L Nicula


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:>

Doron Holan wrote:

You can use the config manager (CM_Xxxx) APIs to walk the tree and find child devices. You can get the device instances from those children as well. What you can’t do is correlate the child stack to a particular port number on the parent.

I would point to the “usbview” tool (source in the WDK) as the canonical
example of how to walk the USB device tree. It isn’t pretty, and it
isn’t necessary modern, but it works.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I have used it as a source of inspiration but it does not seem to help with what I want to do.

Maybe I am not asking the right question. To take it in reverse, given the device path of a USB device, how do I know it is the device that is inserted in port X on hub Y?

Or can I get the DevicePath of the parent hub from the device DevicePath ?

Thanks!

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, September 10, 2012 12:27 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] DevicePath from USB hub and port

Doron Holan wrote:

You can use the config manager (CM_Xxxx) APIs to walk the tree and find child devices. You can get the device instances from those children as well. What you can’t do is correlate the child stack to a particular port number on the parent.

I would point to the “usbview” tool (source in the WDK) as the canonical example of how to walk the USB device tree. It isn’t pretty, and it isn’t necessary modern, but it works.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Why is the correlation to the port number important? If the hub gives vid/pid info on a port number basis, you can get the vid/pid from each child stack’s hardware id list. This breaks down when you have two instances of the same device plugged into the same hub

d

debt from my phone


From: Laurentiu Nicula
Sent: 9/10/2012 12:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

I have used it as a source of inspiration but it does not seem to help with what I want to do.

Maybe I am not asking the right question. To take it in reverse, given the device path of a USB device, how do I know it is the device that is inserted in port X on hub Y?

Or can I get the DevicePath of the parent hub from the device DevicePath ?

Thanks!

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, September 10, 2012 12:27 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] DevicePath from USB hub and port

Doron Holan wrote:

You can use the config manager (CM_Xxxx) APIs to walk the tree and find child devices. You can get the device instances from those children as well. What you can’t do is correlate the child stack to a particular port number on the parent.

I would point to the “usbview” tool (source in the WDK) as the canonical example of how to walk the USB device tree. It isn’t pretty, and it isn’t necessary modern, but it works.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

That is exactly my problem. I can have two devices with same vid/pid in the same hub and only one of them is the “right” one.

I find the “right” one by going down the tree ( USbView style) and talking to the device. At this point I have the DevicePath of the hub and the port number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the “right” one based on what I found above. Either going to the parent and finding the device again or by remembering the device path of the “right” device I found earlier.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 12:46 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

Why is the correlation to the port number important? If the hub gives vid/pid info on a port number basis, you can get the vid/pid from each child stack’s hardware id list. This breaks down when you have two instances of the same device plugged into the same hub

d

debt from my phone


From: Laurentiu Nicula
Sent: 9/10/2012 12:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

I have used it as a source of inspiration but it does not seem to help with what I want to do.

Maybe I am not asking the right question. To take it in reverse, given the device path of a USB device, how do I know it is the device that is inserted in port X on hub Y?

Or can I get the DevicePath of the parent hub from the device DevicePath ?

Thanks!

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, September 10, 2012 12:27 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] DevicePath from USB hub and port

Doron Holan wrote:

You can use the config manager (CM_Xxxx) APIs to walk the tree and find child devices. You can get the device instances from those children as well. What you can’t do is correlate the child stack to a particular port number on the parent.

I would point to the “usbview” tool (source in the WDK) as the canonical example of how to walk the USB device tree. It isn’t pretty, and it isn’t necessary modern, but it works.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:></http:>

What if the device moves to a different hub? It’s path will change. I think you need to describe at a higher level why you think the port number is important. What are you trying to do?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 1:04 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

That is exactly my problem. I can have two devices with same vid/pid in the same hub and only one of them is the “right” one.

I find the “right” one by going down the tree ( USbView style) and talking to the device. At this point I have the DevicePath of the hub and the port number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the “right” one based on what I found above. Either going to the parent and finding the device again or by remembering the device path of the “right” device I found earlier.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 12:46 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

Why is the correlation to the port number important? If the hub gives vid/pid info on a port number basis, you can get the vid/pid from each child stack’s hardware id list. This breaks down when you have two instances of the same device plugged into the same hub

d

debt from my phone


From: Laurentiu Nicula
Sent: 9/10/2012 12:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

I have used it as a source of inspiration but it does not seem to help with what I want to do.

Maybe I am not asking the right question. To take it in reverse, given the device path of a USB device, how do I know it is the device that is inserted in port X on hub Y?

Or can I get the DevicePath of the parent hub from the device DevicePath ?

Thanks!

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, September 10, 2012 12:27 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] DevicePath from USB hub and port

Doron Holan wrote:

You can use the config manager (CM_Xxxx) APIs to walk the tree and find child devices. You can get the device instances from those children as well. What you can’t do is correlate the child stack to a particular port number on the parent.

I would point to the “usbview” tool (source in the WDK) as the canonical example of how to walk the USB device tree. It isn’t pretty, and it isn’t necessary modern, but it works.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:></http:>

If the device is moved, the code will proceed from the top and rediscover it. Nothing is saved for being reused later. Of course the nature of the application lends itself to doing this.

To sum it up at the highest level, given a Devicepath to a device, I need to find if that USB device is the “right” one (has the proper USB descriptor).

Below I am restating how I go about doing that:

I find the “right” one by going down the tree ( USbView style) and talking to the device. At this point I have the DevicePath of the hub and the port number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the “right” one based on what I found above.

Regards,
Laurentiu Nicula

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 1:09 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

What if the device moves to a different hub? It’s path will change. I think you need to describe at a higher level why you think the port number is important. What are you trying to do?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 1:04 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

That is exactly my problem. I can have two devices with same vid/pid in the same hub and only one of them is the “right” one.

I find the “right” one by going down the tree ( USbView style) and talking to the device. At this point I have the DevicePath of the hub and the port number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the “right” one based on what I found above. Either going to the parent and finding the device again or by remembering the device path of the “right” device I found earlier.

Generally, if you have two identical devices out there in the USB world,
you have two devices with the same vid/pid. They are equivalent, as far
as the system is concerned. So the idea that one is “right” is a bit hard
to fathom. What makes one of these more “right” than the other? And how
is its path related to this? If I get a description that says I have a
device in port 3 of the hub that is plugged into port 2 of the hub that is
plugged into port 0 of the motherboard, I have nothing useful. If there
is some query that can be sent to the device that determines its
"right"ness, then you shouldn’t need the path, because you have either the
GUID for it or its device name, e.g., XYZ1 or XYZ2. I gyess I missed some
part of this as to why you need the path information at all.

Note that if the devices have serial numbers, the triple
uniquely identifies it. At that point, its enumeration order doesn’t
matter; your driver, which is invoked by can then query the
to see what GUID to use for the device, based on the last connection, or
the device name. So if I unplug XYZ2 and replug it into some other USB
port, it will again be XYZ2.
joe

> If the device is moved, the code will proceed from the top and rediscover
> it. Nothing is saved for being reused later. Of course the nature of the
> application lends itself to doing this.
>
> To sum it up at the highest level, given a Devicepath to a device, I need
> to find if that USB device is the “right” one (has the proper USB
> descriptor).
>
> Below I am restating how I go about doing that:
>
> I find the “right” one by going down the tree ( USbView style) and talking
> to the device. At this point I have the DevicePath of the hub and the port
> number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is the
> “right” one based on what I found above.
>
> Regards,
> Laurentiu Nicula
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
> Sent: Monday, September 10, 2012 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> What if the device moves to a different hub? It’s path will change. I
> think you need to describe at a higher level why you think the port number
> is important. What are you trying to do?
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
> Sent: Monday, September 10, 2012 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> That is exactly my problem. I can have two devices with same vid/pid in
> the same hub and only one of them is the “right” one.
>
> I find the “right” one by going down the tree ( USbView style) and talking
> to the device. At this point I have the DevicePath of the hub and the port
> number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is the
> “right” one based on what I found above. Either going to the parent and
> finding the device again or by remembering the device path of the “right”
> device I found earlier.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

The device path will change if the port number changes if the device has no serial number. If the device has a serial number, the device path is invariant. So, either make sure your device has a serial number or treat the device path as the unique identifier and when not found, your device has moved or been removed

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 1:40 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

If the device is moved, the code will proceed from the top and rediscover it. Nothing is saved for being reused later. Of course the nature of the application lends itself to doing this.

To sum it up at the highest level, given a Devicepath to a device, I need to find if that USB device is the “right” one (has the proper USB descriptor).

Below I am restating how I go about doing that:

I find the “right” one by going down the tree ( USbView style) and talking to the device. At this point I have the DevicePath of the hub and the port number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the “right” one based on what I found above.

Regards,
Laurentiu Nicula

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 1:09 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

What if the device moves to a different hub? It’s path will change. I think you need to describe at a higher level why you think the port number is important. What are you trying to do?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 1:04 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

That is exactly my problem. I can have two devices with same vid/pid in the same hub and only one of them is the “right” one.

I find the “right” one by going down the tree ( USbView style) and talking to the device. At this point I have the DevicePath of the hub and the port number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the “right” one based on what I found above. Either going to the parent and finding the device again or by remembering the device path of the “right” device I found earlier.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

It is “right” if the USB device has a certain string in the iProduct attribute. I can have a similar device, same vid/pid without the string and I need to know that’s the case if I am given the DevicePath of that device. No serial number exists on the device(s).

If I could go from this DevicePath to query the device and see what is the iProduct, it would also solve the problem.

To restate it in a different way, all I have is a DevicePath and I need to know if the USB device it belongs to has a certain iProduct string.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@flounder.com
Sent: Monday, September 10, 2012 2:01 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

Generally, if you have two identical devices out there in the USB world, you have two devices with the same vid/pid. They are equivalent, as far as the system is concerned. So the idea that one is “right” is a bit hard to fathom. What makes one of these more “right” than the other? And how is its path related to this? If I get a description that says I have a device in port 3 of the hub that is plugged into port 2 of the hub that is plugged into port 0 of the motherboard, I have nothing useful. If there is some query that can be sent to the device that determines its "right"ness, then you shouldn’t need the path, because you have either the GUID for it or its device name, e.g., XYZ1 or XYZ2. I gyess I missed some part of this as to why you need the path information at all.

Note that if the devices have serial numbers, the triple uniquely identifies it. At that point, its enumeration order doesn’t matter; your driver, which is invoked by can then query the to see what GUID to use for the device, based on the last connection, or the device name. So if I unplug XYZ2 and replug it into some other USB port, it will again be XYZ2.
joe

> If the device is moved, the code will proceed from the top and
> rediscover it. Nothing is saved for being reused later. Of course the
> nature of the application lends itself to doing this.
>
> To sum it up at the highest level, given a Devicepath to a device, I
> need to find if that USB device is the “right” one (has the proper USB
> descriptor).
>
> Below I am restating how I go about doing that:
>
> I find the “right” one by going down the tree ( USbView style) and
> talking to the device. At this point I have the DevicePath of the hub
> and the port number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the “right” one based on what I found above.
>
> Regards,
> Laurentiu Nicula
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
> Sent: Monday, September 10, 2012 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> What if the device moves to a different hub? It’s path will change. I
> think you need to describe at a higher level why you think the port
> number is important. What are you trying to do?
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu
> Nicula
> Sent: Monday, September 10, 2012 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> That is exactly my problem. I can have two devices with same vid/pid
> in the same hub and only one of them is the “right” one.
>
> I find the “right” one by going down the tree ( USbView style) and
> talking to the device. At this point I have the DevicePath of the hub
> and the port number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the “right” one based on what I found above. Either going to the
> parent and finding the device again or by remembering the device path of the “right”
> device I found earlier.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Do you control the driver? How about the driver writes the iProduct attribute to the devnode? That way you don’t need to bind information from the parent with the child stack

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 2:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

It is “right” if the USB device has a certain string in the iProduct attribute. I can have a similar device, same vid/pid without the string and I need to know that’s the case if I am given the DevicePath of that device. No serial number exists on the device(s).

If I could go from this DevicePath to query the device and see what is the iProduct, it would also solve the problem.

To restate it in a different way, all I have is a DevicePath and I need to know if the USB device it belongs to has a certain iProduct string.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@flounder.com
Sent: Monday, September 10, 2012 2:01 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

Generally, if you have two identical devices out there in the USB world, you have two devices with the same vid/pid. They are equivalent, as far as the system is concerned. So the idea that one is “right” is a bit hard to fathom. What makes one of these more “right” than the other? And how is its path related to this? If I get a description that says I have a device in port 3 of the hub that is plugged into port 2 of the hub that is plugged into port 0 of the motherboard, I have nothing useful. If there is some query that can be sent to the device that determines its "right"ness, then you shouldn’t need the path, because you have either the GUID for it or its device name, e.g., XYZ1 or XYZ2. I gyess I missed some part of this as to why you need the path information at all.

Note that if the devices have serial numbers, the triple uniquely identifies it. At that point, its enumeration order doesn’t matter; your driver, which is invoked by can then query the to see what GUID to use for the device, based on the last connection, or the device name. So if I unplug XYZ2 and replug it into some other USB port, it will again be XYZ2.
joe

> If the device is moved, the code will proceed from the top and
> rediscover it. Nothing is saved for being reused later. Of course the
> nature of the application lends itself to doing this.
>
> To sum it up at the highest level, given a Devicepath to a device, I
> need to find if that USB device is the “right” one (has the proper USB
> descriptor).
>
> Below I am restating how I go about doing that:
>
> I find the “right” one by going down the tree ( USbView style) and
> talking to the device. At this point I have the DevicePath of the hub
> and the port number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the “right” one based on what I found above.
>
> Regards,
> Laurentiu Nicula
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
> Sent: Monday, September 10, 2012 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> What if the device moves to a different hub? It’s path will change. I
> think you need to describe at a higher level why you think the port
> number is important. What are you trying to do?
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu
> Nicula
> Sent: Monday, September 10, 2012 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> That is exactly my problem. I can have two devices with same vid/pid
> in the same hub and only one of them is the “right” one.
>
> I find the “right” one by going down the tree ( USbView style) and
> talking to the device. At this point I have the DevicePath of the hub
> and the port number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the “right” one based on what I found above. Either going to the
> parent and finding the device again or by remembering the device path of the “right”
> device I found earlier.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

No, it is using standard Windows drivers and there is no other 3rd party involved.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 3:09 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

Do you control the driver? How about the driver writes the iProduct attribute to the devnode? That way you don’t need to bind information from the parent with the child stack

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 2:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

It is “right” if the USB device has a certain string in the iProduct attribute. I can have a similar device, same vid/pid without the string and I need to know that’s the case if I am given the DevicePath of that device. No serial number exists on the device(s).

If I could go from this DevicePath to query the device and see what is the iProduct, it would also solve the problem.

To restate it in a different way, all I have is a DevicePath and I need to know if the USB device it belongs to has a certain iProduct string.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@flounder.com
Sent: Monday, September 10, 2012 2:01 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

Generally, if you have two identical devices out there in the USB world, you have two devices with the same vid/pid. They are equivalent, as far as the system is concerned. So the idea that one is “right” is a bit hard to fathom. What makes one of these more “right” than the other? And how is its path related to this? If I get a description that says I have a device in port 3 of the hub that is plugged into port 2 of the hub that is plugged into port 0 of the motherboard, I have nothing useful. If there is some query that can be sent to the device that determines its "right"ness, then you shouldn’t need the path, because you have either the GUID for it or its device name, e.g., XYZ1 or XYZ2. I gyess I missed some part of this as to why you need the path information at all.

Note that if the devices have serial numbers, the triple uniquely identifies it. At that point, its enumeration order doesn’t matter; your driver, which is invoked by can then query the to see what GUID to use for the device, based on the last connection, or the device name. So if I unplug XYZ2 and replug it into some other USB port, it will again be XYZ2.
joe

> If the device is moved, the code will proceed from the top and
> rediscover it. Nothing is saved for being reused later. Of course the
> nature of the application lends itself to doing this.
>
> To sum it up at the highest level, given a Devicepath to a device, I
> need to find if that USB device is the “right” one (has the proper USB
> descriptor).
>
> Below I am restating how I go about doing that:
>
> I find the “right” one by going down the tree ( USbView style) and
> talking to the device. At this point I have the DevicePath of the hub
> and the port number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the “right” one based on what I found above.
>
> Regards,
> Laurentiu Nicula
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
> Sent: Monday, September 10, 2012 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> What if the device moves to a different hub? It’s path will change. I
> think you need to describe at a higher level why you think the port
> number is important. What are you trying to do?
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu
> Nicula
> Sent: Monday, September 10, 2012 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> That is exactly my problem. I can have two devices with same vid/pid
> in the same hub and only one of them is the “right” one.
>
> I find the “right” one by going down the tree ( USbView style) and
> talking to the device. At this point I have the DevicePath of the hub
> and the port number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the “right” one based on what I found above. Either going to the
> parent and finding the device again or by remembering the device path of the “right”
> device I found earlier.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I don’t understand. If the device is serial #12345 and today it is
plugged into the root hub, and tomorrow it is plugged into the hub which
is plugged into the hub which is plugged into the root hub, how is the
device path “invariant”? It will be different on both days, or so I would
expect. Can you clarify, please?
thanks
joe

The device path will change if the port number changes if the device has
no serial number. If the device has a serial number, the device path is
invariant. So, either make sure your device has a serial number or treat
the device path as the unique identifier and when not found, your device
has moved or been removed

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 1:40 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

If the device is moved, the code will proceed from the top and rediscover
it. Nothing is saved for being reused later. Of course the nature of the
application lends itself to doing this.

To sum it up at the highest level, given a Devicepath to a device, I need
to find if that USB device is the “right” one (has the proper USB
descriptor).

Below I am restating how I go about doing that:

I find the “right” one by going down the tree ( USbView style) and talking
to the device. At this point I have the DevicePath of the hub and the port
number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the
“right” one based on what I found above.

Regards,
Laurentiu Nicula

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 1:09 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

What if the device moves to a different hub? It’s path will change. I
think you need to describe at a higher level why you think the port number
is important. What are you trying to do?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 1:04 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

That is exactly my problem. I can have two devices with same vid/pid in
the same hub and only one of them is the “right” one.

I find the “right” one by going down the tree ( USbView style) and talking
to the device. At this point I have the DevicePath of the hub and the port
number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the
“right” one based on what I found above. Either going to the parent and
finding the device again or by remembering the device path of the “right”
device I found earlier.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

If a device has a unique id ( a serial number in the usb case), the device has a system globally unique identity. That identity is maintained no matter how the device is connected or the topology behind it (and it just so happens the unique id is third part if the device instance path as a part if the current implementation)

d

debt from my phone


From: xxxxx@flounder.com
Sent: 9/10/2012 9:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

I don’t understand. If the device is serial #12345 and today it is
plugged into the root hub, and tomorrow it is plugged into the hub which
is plugged into the hub which is plugged into the root hub, how is the
device path “invariant”? It will be different on both days, or so I would
expect. Can you clarify, please?
thanks
joe

The device path will change if the port number changes if the device has
no serial number. If the device has a serial number, the device path is
invariant. So, either make sure your device has a serial number or treat
the device path as the unique identifier and when not found, your device
has moved or been removed

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 1:40 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

If the device is moved, the code will proceed from the top and rediscover
it. Nothing is saved for being reused later. Of course the nature of the
application lends itself to doing this.

To sum it up at the highest level, given a Devicepath to a device, I need
to find if that USB device is the “right” one (has the proper USB
descriptor).

Below I am restating how I go about doing that:

I find the “right” one by going down the tree ( USbView style) and talking
to the device. At this point I have the DevicePath of the hub and the port
number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the
“right” one based on what I found above.

Regards,
Laurentiu Nicula

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, September 10, 2012 1:09 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

What if the device moves to a different hub? It’s path will change. I
think you need to describe at a higher level why you think the port number
is important. What are you trying to do?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
Sent: Monday, September 10, 2012 1:04 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

That is exactly my problem. I can have two devices with same vid/pid in
the same hub and only one of them is the “right” one.

I find the “right” one by going down the tree ( USbView style) and talking
to the device. At this point I have the DevicePath of the hub and the port
number where the device is.

Later, I am given the Devicepath of a device and I need to know if is the
“right” one based on what I found above. Either going to the parent and
finding the device again or by remembering the device path of the “right”
device I found earlier.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Got it, I think. So the “path” is a logical, rather than a physical
concept? The connection topology is then the default if a more abstract
logical path (based on s/n) cannot be assigned?
joe

If a device has a unique id ( a serial number in the usb case), the
device has a system globally unique identity. That identity is maintained
no matter how the device is connected or the topology behind it (and it
just so happens the unique id is third part if the device instance path as
a part if the current implementation)

d

debt from my phone


From: xxxxx@flounder.com
Sent: 9/10/2012 9:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

I don’t understand. If the device is serial #12345 and today it is
plugged into the root hub, and tomorrow it is plugged into the hub which
is plugged into the hub which is plugged into the root hub, how is the
device path “invariant”? It will be different on both days, or so I would
expect. Can you clarify, please?
thanks
joe

> The device path will change if the port number changes if the device has
> no serial number. If the device has a serial number, the device path is
> invariant. So, either make sure your device has a serial number or
> treat
> the device path as the unique identifier and when not found, your device
> has moved or been removed
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
> Sent: Monday, September 10, 2012 1:40 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> If the device is moved, the code will proceed from the top and
> rediscover
> it. Nothing is saved for being reused later. Of course the nature of the
> application lends itself to doing this.
>
> To sum it up at the highest level, given a Devicepath to a device, I
> need
> to find if that USB device is the “right” one (has the proper USB
> descriptor).
>
> Below I am restating how I go about doing that:
>
> I find the “right” one by going down the tree ( USbView style) and
> talking
> to the device. At this point I have the DevicePath of the hub and the
> port
> number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the
> “right” one based on what I found above.
>
> Regards,
> Laurentiu Nicula
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
> Sent: Monday, September 10, 2012 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> What if the device moves to a different hub? It’s path will change. I
> think you need to describe at a higher level why you think the port
> number
> is important. What are you trying to do?
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
> Sent: Monday, September 10, 2012 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> That is exactly my problem. I can have two devices with same vid/pid in
> the same hub and only one of them is the “right” one.
>
> I find the “right” one by going down the tree ( USbView style) and
> talking
> to the device. At this point I have the DevicePath of the hub and the
> port
> number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the
> “right” one based on what I found above. Either going to the parent and
> finding the device again or by remembering the device path of the
> “right”
> device I found earlier.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Correct. If the device has no unique id, the device’s identity will be based on the parent’s identity which is why when it moves to a different space in the topology, the identity changes

d

debt from my phone


From: xxxxx@flounder.com
Sent: 9/10/2012 9:55 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

Got it, I think. So the “path” is a logical, rather than a physical
concept? The connection topology is then the default if a more abstract
logical path (based on s/n) cannot be assigned?
joe

If a device has a unique id ( a serial number in the usb case), the
device has a system globally unique identity. That identity is maintained
no matter how the device is connected or the topology behind it (and it
just so happens the unique id is third part if the device instance path as
a part if the current implementation)

d

debt from my phone


From: xxxxx@flounder.com
Sent: 9/10/2012 9:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DevicePath from USB hub and port

I don’t understand. If the device is serial #12345 and today it is
plugged into the root hub, and tomorrow it is plugged into the hub which
is plugged into the hub which is plugged into the root hub, how is the
device path “invariant”? It will be different on both days, or so I would
expect. Can you clarify, please?
thanks
joe

> The device path will change if the port number changes if the device has
> no serial number. If the device has a serial number, the device path is
> invariant. So, either make sure your device has a serial number or
> treat
> the device path as the unique identifier and when not found, your device
> has moved or been removed
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
> Sent: Monday, September 10, 2012 1:40 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> If the device is moved, the code will proceed from the top and
> rediscover
> it. Nothing is saved for being reused later. Of course the nature of the
> application lends itself to doing this.
>
> To sum it up at the highest level, given a Devicepath to a device, I
> need
> to find if that USB device is the “right” one (has the proper USB
> descriptor).
>
> Below I am restating how I go about doing that:
>
> I find the “right” one by going down the tree ( USbView style) and
> talking
> to the device. At this point I have the DevicePath of the hub and the
> port
> number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the
> “right” one based on what I found above.
>
> Regards,
> Laurentiu Nicula
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
> Sent: Monday, September 10, 2012 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> What if the device moves to a different hub? It’s path will change. I
> think you need to describe at a higher level why you think the port
> number
> is important. What are you trying to do?
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Laurentiu Nicula
> Sent: Monday, September 10, 2012 1:04 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] DevicePath from USB hub and port
>
> That is exactly my problem. I can have two devices with same vid/pid in
> the same hub and only one of them is the “right” one.
>
> I find the “right” one by going down the tree ( USbView style) and
> talking
> to the device. At this point I have the DevicePath of the hub and the
> port
> number where the device is.
>
> Later, I am given the Devicepath of a device and I need to know if is
> the
> “right” one based on what I found above. Either going to the parent and
> finding the device again or by remembering the device path of the
> “right”
> device I found earlier.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer