Hi all,
Suppose I want to convert a file path to DOS path.
For the file itself, it’s easily achieved using
IoQueryFileDosDeviceName(), since I have the FILE_OBJECT at hand.
However, in the case of RENAME, I only have the destination name in
FILE_RENAME_INFORMATION.
Which way would you advise to proceed?
Thanks in advance,
Greg.
I would try FltGetDestinationFileNameInformation, then
FltParseFileNameInformation and then IoVolumeDeviceToDosName on the original
FileObject->DeviceObject since rename doesn’t work across volumes. Then
simply concatenate the DOS name with the destination file name after the
volume (which is where FltParseFileNameInformation helps).
Thanks,
Alex.
In addition to what Alex says, remember that not every file can have a dos
device name. I’d also be very very careful about symbolic links.
“Greg” wrote in message news:xxxxx@ntfsd…
> Hi all,
>
> Suppose I want to convert a file path to DOS path.
> For the file itself, it’s easily achieved using
> IoQueryFileDosDeviceName(), since I have the FILE_OBJECT at hand.
> However, in the case of RENAME, I only have the destination name in
> FILE_RENAME_INFORMATION.
> Which way would you advise to proceed?
>
> Thanks in advance,
> Greg.
>
Thanks a lot, Alex.
Greg
On Wed, Oct 13, 2010 at 5:32 PM, Alex Carp wrote:
> I would try FltGetDestinationFileNameInformation, then
> FltParseFileNameInformation and then IoVolumeDeviceToDosName on the original
> FileObject->DeviceObject since rename doesn’t work across volumes. Then
> simply concatenate the DOS name with the destination file name after the
> volume (which is where FltParseFileNameInformation helps).
>
> Thanks,
> Alex.
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
Thanks Rod.
Greg
On Thu, Oct 14, 2010 at 10:46 AM, Rod Widdowson
wrote:
> In addition to what Alex says, remember that not every file can have a dos
> device name. ?I’d also be very very careful about symbolic links.
>
>
> “Greg” wrote in message news:xxxxx@ntfsd…
>>
>> Hi all,
>>
>> Suppose I want to convert a file path to DOS path.
>> For the file itself, it’s easily achieved using
>> IoQueryFileDosDeviceName(), since I have the FILE_OBJECT at hand.
>> However, in the case of RENAME, I only have the destination name in
>> FILE_RENAME_INFORMATION.
>> Which way would you advise to proceed?
>>
>> Thanks in advance,
>> Greg.
>>
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>