FileName from FileHandle

I am trying to get FileName from filehandle. I used ZwQueryInformationFile
with FileInformationClass “FileNameInformation”. This function behaves
exactly as it is documented. I get the File name, but not the drive letter.
Can someone tell me how could i get the drive letter?
Is there any other method to get the Full path and file name from the file
handle?
If ZwQueryInformationFile returns relative path, how can i get the full path
and driver letter in that case?

Any help or pointers to docs are appreciated.
Thanks,
Srin.

Getting the full path to the file involves a bit of work, including
handling relative opens, open by id creates etc.
Look at the filespy sample shipped in the IFSKit for sample code.

Ravi

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@NAI.com [mailto:xxxxx@NAI.com]
Sent: Monday, September 23, 2002 10:06 PM
To: NT Developers Interest List
Subject: [ntdev] FileName from FileHandle

I am trying to get FileName from filehandle. I used
ZwQueryInformationFile with FileInformationClass “FileNameInformation”.
This function behaves exactly as it is documented. I get the File name,
but not the drive letter.
Can someone tell me how could i get the drive letter?
Is there any other method to get the Full path and file name from the
file handle? If ZwQueryInformationFile returns relative path, how can i
get the full path and driver letter in that case?

Any help or pointers to docs are appreciated.
Thanks,
Srin.


You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%