RE: In win32 App, NtQueryInformationFile only queried fil e name, how to get the volume name as well

No you don’t. You called NtQueryInformationFile and got the file name. Now
call GetFullPathName with the results from that call.

=====================
Mark Roddy

-----Original Message-----
From: OSR list [mailto:Tom_lyd@163.com]
Sent: Wednesday, June 09, 2004 7:54 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] In win32 App, NtQueryInformationFile only queried file
name, how to get the volume name as well ?

I have only a file handle, not file name.


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

You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

From MSDN
"GetFullPathName merges the name of the current drive and directory with the specified file name to determine the full path and file name of the specified file. It also calculates the address of the file name portion of the full path and file name. This function does not verify that the resulting path and file name are valid or that they refer to an existing file on the associated volume. "

As such the results of GetFullpath doesn’t have any correlation to the volume specified when the handle was opened.

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Wednesday, June 09, 2004 9:04 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] In win32 App, NtQueryInformationFile only queried
fil e name, how to get the volume name as well ?

No you don’t. You called NtQueryInformationFile and got the file name. Now
call GetFullPathName with the results from that call.

=====================
Mark Roddy

-----Original Message-----
From: OSR list [mailto:Tom_lyd@163.com]
Sent: Wednesday, June 09, 2004 7:54 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] In win32 App, NtQueryInformationFile only queried file
name, how to get the volume name as well ?

I have only a file handle, not file name.


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

You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


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

You are currently subscribed to ntdev as: xxxxx@entivity.com
To unsubscribe send a blank email to xxxxx@lists.osr.com