how to get devie name with device object

Hello,

I want to ask does a function exist with that I can directly get Device
name througt a device object if the device does have a name.

And, how can i get a device object if i have got the device name.

Thanks

ObQueryNameString()


Slava Imameyev, xxxxx@hotmail.com

“??” wrote in message news:xxxxx@ntdev…
Hello,

I want to ask does a function exist with that I can directly get Device name througt a device object if the device does have a name.

And, how can i get a device object if i have got the device name.

Thanks

Pls note that this is an undocumented API. Why is the name of the device object important? I have never seen the situation where once you have a device object, it’s name is of any importance (since you already have the device object pointer).

And, how can i get a device object if i have got the device name.
IoGetDeviceObjectPointer(). Remember to release the ref on the fileobject after you are done using the devobj.

d

Au contraire. ObQueryNameString has been documented for many years in the
IFS kit, and remains so in the WDK.

It is very common in file system filter drivers to want the name of the
device, since it is part of the namespace for the filesystem.

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@Microsoft.com
Sent: Friday, September 08, 2006 9:06 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] how to get devie name with device object

Pls note that this is an undocumented API. Why is the name of the device
object important? I have never seen the situation where once you have a
device object, it’s name is of any importance (since you already have the
device object pointer).

And, how can i get a device object if i have got the device name.
IoGetDeviceObjectPointer(). Remember to release the ref on the fileobject
after you are done using the devobj.

d


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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