In CREATE I need to determine; is the fileObj–>FileName a short file
name and if it is, convert it to the long file name.
Earlier posts say the way to do this is via ZwQueryDirectoryFile –>
FileNamesInformation.
If this is the way to do it how, from the array of
FILE_NAMES_INFORMATION structures, do I associate the short name?
Thanks,
Daniel Nemiroff
Try NtQueryInformationFile/FileNameInformation
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Nemiroff, Daniel
To: Windows File Systems Devs Interest List
Sent: Thursday, May 19, 2005 8:42 PM
Subject: [ntfsd] short to long file name conversion
In CREATE I need to determine; is the fileObj?FileName a short file name and if it is, convert it to the long file name.
Earlier posts say the way to do this is via ZwQueryDirectoryFile ? FileNamesInformation.
If this is the way to do it how, from the array of FILE_NAMES_INFORMATION structures, do I associate the short name?
Thanks,
Daniel Nemiroff
Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
> Try NtQueryInformationFile/FileNameInformation
Note that on NTFS, this approach does not work if the
file has been open using the short name. Ntfs will return
exactly the name that has been used for opening the file.
At least this was in the past, I haven’t checked
this some time ago.
L.
Possibly. I used this only to convert the pathname to its long form, not to extract the pathname of the already opened file.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Ladislav Zezula
To: Windows File Systems Devs Interest List
Sent: Friday, May 20, 2005 11:54 AM
Subject: Re: [ntfsd] short to long file name conversion
Try NtQueryInformationFile/FileNameInformation
Note that on NTFS, this approach does not work if the
file has been open using the short name. Ntfs will return
exactly the name that has been used for opening the file.
At least this was in the past, I haven’t checked
this some time ago.
L.
Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
How do I determine whether a name in CREATE is a short or long file
name?
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Friday, May 20, 2005 7:55 AM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] short to long file name conversion
Possibly. I used this only to convert the pathname to its long form,
not to extract the pathname of the already opened file.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Ladislav Zezula mailto:xxxxx
To: Windows File Systems Devs Interest List
mailto:xxxxx
Sent: Friday, May 20, 2005 11:54 AM
Subject: Re: [ntfsd] short to long file name conversion
> Try NtQueryInformationFile/FileNameInformation
Note that on NTFS, this approach does not work if the
file has been open using the short name. Ntfs will return
exactly the name that has been used for opening the file.
At least this was in the past, I haven’t checked
this some time ago.
L.
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to
xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:xxxxx></mailto:xxxxx>
Open the parent directory
if (ZwQueryDirectoryFile /
FileBothDirectoryInformation with the file name that
was passed to create) succeeds
{
You have the long name in the query results
}
else
{
The name passed to create is the long name
}
Close parent dir
Note that if you are converting a full path, you will
need to do this for each component of the path.
If you can do a mini-filter, they handle/cache all of
this for you.
— “Nemiroff, Daniel”
wrote:
> How do I determine whether a name in CREATE is a
> short or long file
> name?
>
>
>
> ________________________________
>
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of Maxim S.
> Shatskih
> Sent: Friday, May 20, 2005 7:55 AM
> To: Windows File Systems Devs Interest List
> Subject: Re: [ntfsd] short to long file name
> conversion
>
>
>
> Possibly. I used this only to convert the
> pathname to its long form,
> not to extract the pathname of the already opened
> file.
>
>
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
>
> From: Ladislav Zezula mailto:xxxxx
>
> To: Windows File Systems Devs Interest List
> mailto:xxxxx
>
> Sent: Friday, May 20, 2005 11:54 AM
>
> Subject: Re: [ntfsd] short to long file name
> conversion
>
>
>
> > Try NtQueryInformationFile/FileNameInformation
>
>
>
> Note that on NTFS, this approach does not work if
> the
>
> file has been open using the short name. Ntfs will
> return
>
> exactly the name that has been used for opening the
> file.
>
>
>
> At least this was in the past, I haven’t checked
>
> this some time ago.
>
>
>
> L.
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown
> lmsubst tag
> argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown
> lmsubst tag argument:
> ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:xxxxx></mailto:xxxxx>
If you do this in dispatch, you will need to query the containing
directory (use the name you have as the search string). Once the file
has been opened you can query the underlying FSD (as several people have
mentioned).
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com http:</http:>
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nemiroff, Daniel
Sent: Thursday, May 19, 2005 12:42 PM
To: ntfsd redirect
Subject: [ntfsd] short to long file name conversion
In CREATE I need to determine; is the fileObj–>FileName a short file
name and if it is, convert it to the long file name.
Earlier posts say the way to do this is via ZwQueryDirectoryFile –>
FileNamesInformation.
If this is the way to do it how, from the array of
FILE_NAMES_INFORMATION structures, do I associate the short name?
Thanks,
Daniel Nemiroff
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com