Device Path Meaning In SetupDiGetDeviceInterfaceDetail

Dear Team,

I am using Setup API routine to enumerate HIS systems attached to the system and find the required device. The complete device path to required device from the call SetupDiGetDeviceInterfaceDetailW is retrieved but I am not clear of all the fields. I am comparing the required device details by reverse engineering.

Here is the sample path to my device:

\?\hid#vid_0123&pid_0456#7&2fd2e0e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}

Out of which I understand that {4d1e55b2-f16f-11cf-88cb-001111000030} is HID device GUID, vid and pid corresponds to device vendor and product identifiers. Could somebody provide a pointer to what does the middle field #7&2fd2e0e9&0&0000# represents.

Regards.

It’s opaque, you don’t parse the string at all. It is used as a whole to identify the device and as a parameter to createfile, nothing more

d

debt from my phone


From: xxxxx@gmail.com
Sent: 11/29/2011 9:36 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Device Path Meaning In SetupDiGetDeviceInterfaceDetail

Dear Team,

I am using Setup API routine to enumerate HIS systems attached to the system and find the required device. The complete device path to required device from the call SetupDiGetDeviceInterfaceDetailW is retrieved but I am not clear of all the fields. I am comparing the required device details by reverse engineering.

Here is the sample path to my device:

\?\hid#vid_0123&pid_0456#7&2fd2e0e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}

Out of which I understand that {4d1e55b2-f16f-11cf-88cb-001111000030} is HID device GUID, vid and pid corresponds to device vendor and product identifiers. Could somebody provide a pointer to what does the middle field #7&2fd2e0e9&0&0000# represents.

Regards.


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 understand that it need not be parsed and by providing the same to
CreateFile, it succeeds. But just wanted to know the rationale behind
it.

Like how the initial part is for vid, pid and later part is HID guid,
is their any meaning or suggested to use just like that.

On Wed, Nov 30, 2011 at 11:37 AM, Doron Holan wrote:
> It’s opaque, you don’t parse the string at all. It is used as a whole to
> identify the device and as a parameter to createfile, nothing more
>
> d
>
> debt from my phone
> ________________________________
> From: xxxxx@gmail.com
> Sent: 11/29/2011 9:36 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Device Path Meaning In SetupDiGetDeviceInterfaceDetail
>
> Dear Team,
>
> I am using Setup API routine to enumerate HIS systems attached to the system
> and find the required device.? The complete device path to required device
> from the call SetupDiGetDeviceInterfaceDetailW is retrieved but I am not
> clear of all the fields.? I am comparing the required device details by
> reverse engineering.
>
> Here is the sample path to my device:
>
> \?\hid#vid_0123&pid_0456#7&2fd2e0e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
>
> Out of which I understand that {4d1e55b2-f16f-11cf-88cb-001111000030} is HID
> device GUID, vid and pid corresponds to device vendor and product
> identifiers.? Could somebody provide a pointer to what does the middle field
> #7&2fd2e0e9&0&0000# represents.
>
> Regards.
>
> —
> 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

There are discrete pieces that make up the strong, dont take any dependencies on them. That is why it is opaque.

d

debt from my phone


From: Bhaskar
Sent: 11/29/2011 10:28 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Device Path Meaning In SetupDiGetDeviceInterfaceDetail

I understand that it need not be parsed and by providing the same to
CreateFile, it succeeds. But just wanted to know the rationale behind
it.

Like how the initial part is for vid, pid and later part is HID guid,
is their any meaning or suggested to use just like that.

On Wed, Nov 30, 2011 at 11:37 AM, Doron Holan wrote:
> It’s opaque, you don’t parse the string at all. It is used as a whole to
> identify the device and as a parameter to createfile, nothing more
>
> d
>
> debt from my phone
> ________________________________
> From: xxxxx@gmail.com
> Sent: 11/29/2011 9:36 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Device Path Meaning In SetupDiGetDeviceInterfaceDetail
>
> Dear Team,
>
> I am using Setup API routine to enumerate HIS systems attached to the system
> and find the required device. The complete device path to required device
> from the call SetupDiGetDeviceInterfaceDetailW is retrieved but I am not
> clear of all the fields. I am comparing the required device details by
> reverse engineering.
>
> Here is the sample path to my device:
>
> \?\hid#vid_0123&pid_0456#7&2fd2e0e9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
>
> Out of which I understand that {4d1e55b2-f16f-11cf-88cb-001111000030} is HID
> device GUID, vid and pid corresponds to device vendor and product
> identifiers. Could somebody provide a pointer to what does the middle field
> #7&2fd2e0e9&0&0000# represents.
>
> Regards.
>
> —
> 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

>device. The complete device path to required device from the call

SetupDiGetDeviceInterfaceDetailW is retrieved but I am not clear of all the fields. I am comparing the
required device details by reverse engineering.

It is undocumented and you should not do this. Compare the HW instance IDs instead.

Or: write a coinstaller, which will add a proper sequential device registry value for each newly created devnode. Then read this value using SetupDiOpenDevRegKey.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com