How to get device's name?

If I have a DEVICE_OBJECT pointer,how I can get its name?

http://www.eyou.com
–Îȶ¨¿É¿¿µÄµç×ÓÐÅÏä ÓïÒôÓʼþ Òƶ¯ÊéÇ© ÈÕÀú·þÎñ ÍøÂç´æ´¢…ÒÚÓÊδ¾¡

http://vip.eyou.com
–¿ì¿ìµÇ¼ÒÚÓÊVIPÐÅÏä ×¢²áÄúÖÐÒâµÄÓû§Ãû

Look at the name in the DRIVER_OBJECT.


The personal opinion of
Gary G. Little

“f” wrote in message news:xxxxx@ntdev…
> If I have a DEVICE_OBJECT pointer,how I can get its name?
>
>
>
>
>
> –http://www.eyou.com
> --Îȶ¨¿É¿¿µÄµç×ÓÐÅÏä ÓïÒôÓʼþ Òƶ¯ÊéÇ© ÈÕÀú·þÎñ ÍøÂç´æ´¢…ÒÚÓÊδ¾¡
>
> –http://vip.eyou.com
> --¿ì¿ìµÇ¼ÒÚÓÊVIPÐÅÏä ×¢²áÄúÖÐÒâµÄÓû§Ãû
>
>
>

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@windows.microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, November 04, 2004 3:10 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] [ntdev] How to get device’s name?

For PDOs, you can use IoGetDeviceObjectProperty, otherwise there is no documented way. If you already have a PDEVICE_OBJECT, why do you need its name?

Once I needed to create symbolic link to my own device with autogenerated name. It was for backward compatibility with legacy software and I didn’t want to create named device. So I used ObQueryNameString() which is documented (in the IFS kit).

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]