get Device Instance Path

Hi everyone,
Can anybody tell me a way to get the Device Instance Path
(ie. USBSTOR\DISK&VEN_KINGSTON&PROD_DT_101_II&REV_1.00\001CC0EC350DAA2097D82A42&0)
for a USB device(or physical device)?


Prageeth Madhushanka
Sri Lanka

In usermode, this is easy. You can use setup api functions to get the string. This is intentionally not exposed in kernel mode. Why do you need the instance path? What are you going to do with it?

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Prageeth Madhushanka
Sent: Tuesday, April 27, 2010 10:58 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] get Device Instance Path

Hi everyone,
Can anybody tell me a way to get the Device Instance Path (ie. USBSTOR\DISK&VEN_KINGSTON&PROD_DT_101_II&REV_1.00\001CC0EC350DAA2097D82A42&0) for a USB device(or physical device)?


Prageeth Madhushanka
Sri Lanka
— 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

Doron Holan wroet:

In usermode, this is easy. You can use setup api functions to get
the string. This is intentionally not exposed in kernel mode. Why
do you need the instance path? What are you going to do with it?

[Attempt to] parse the physical port number, of course…

“Doron Holan” wrote in message
news:xxxxx@ntdev…
> In usermode, this is easy. You can use setup api functions to get the
> string. This is intentionally not exposed in kernel mode. Why do you need
> the instance path? What are you going to do with it?

Can’t a driver send down IRP_MN_QUERY_ID with BusQueryInstanceID?
–pa

> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Prageeth
> Madhushanka
> Sent: Tuesday, April 27, 2010 10:58 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] get Device Instance Path
>
> Hi everyone,
> Can anybody tell me a way to get the Device Instance Path (ie.
> USBSTOR\DISK&VEN_KINGSTON&PROD_DT_101_II&REV_1.00\001CC0EC350DAA2097D82A42&0)
> for a USB device(or physical device)?
>
> –
> Prageeth Madhushanka
> Sri Lanka
> — 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 gives you x\y part of the x\y\z device instance path

d

sent from a phpne with no keynoard

-----Original Message-----
From: Pavel A.
Sent: April 28, 2010 5:45 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] get Device Instance Path

“Doron Holan” wrote in message
news:xxxxx@ntdev…
> In usermode, this is easy. You can use setup api functions to get the
> string. This is intentionally not exposed in kernel mode. Why do you need
> the instance path? What are you going to do with it?

Can’t a driver send down IRP_MN_QUERY_ID with BusQueryInstanceID?
–pa

> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Prageeth
> Madhushanka
> Sent: Tuesday, April 27, 2010 10:58 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] get Device Instance Path
>
> Hi everyone,
> Can anybody tell me a way to get the Device Instance Path (ie.
> USBSTOR\DISK&VEN_KINGSTON&PROD_DT_101_II&REV_1.00\001CC0EC350DAA2097D82A42&0)
> for a USB device(or physical device)?
>
> –
> Prageeth Madhushanka
> Sri Lanka
> — 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