Hi Everyone,
I’m new to drivers and I’m trying to do something like Junction Link using Reparse Point & Minifilters.
What I have currently, is in a Post Operation Callback function, I’ll modify the content of ‘Data->Iopb->TargetFileObject->FileName’ and change it to a different path depending on the data in ‘Data->TagData->GenericGUIDReparseBuffer.DataBuffer’.
It works fine as I expected until when i open a folder(reparse point) that has a long path name, around 150 characters, it will fail.
I checked using WinDBG and found out that when I access a folder(reparse point) that has a long path name, i will get some wierd characters like ‘??t???’ at the end of ‘Data->Iopb->TargetFileObject->FileName.Buffer’. It is essential for the code to know the folder name that it used so with all the weird characters at the end, it will fail to work.
Can anybody tell me why is this happening?
Thanks.
Publish your photos to your Space easily with Photo Gallery
http://www.get.live.com/wl/all
Anyone can help? Or I have posted this in the wrong place?
I am not an expert in mini-filters at all, but just pointing out things strange to me.
What I have currently, is in a Post Operation Callback function,
Do you mean only Create request or any request?
i will get some wierd characters like ‘??t?=02???’
at the end of ‘Data->Iopb->TargetFileObject->FileName.Buffer’.
Maybe stupid question in driver forum, but just verifying: Do you know that the string is not null terminated? Do you inspect ‘Data->Iopb->TargetFileObject->FileName.Length’ field for lenght (in bytes). Also FileName in FILE_OBJECT is valid only during create operation, which is not probably your problem.
Ho do you setup Reparse point? From User mode or kernel mode ?( DeviceIoControl(), FltTagFile() or ZwFsControlFile()). It is intended to be likely static information, so I hope you don’t setup it for each Create.
Maybe there are no answers because you didn’t provide enough info.
Good luck
-bg
At quick glance, several things come to mind.
First, I would agree with bg about not accessing the filename in
post-create. Secondly,
access it in pre-create and allocate a buffer - then pass it via the
completion context
parameter to avoid the flt functions.
Doing that should take you 30 seconds and clear-up the garbage characters
your seeing.
Have Fun,
Matt
----- Original Message -----
From:
To: “Windows File Systems Devs Interest List”
Sent: Monday, February 11, 2008 3:02 AM
Subject: RE:[ntfsd] Long Path Name problem
I am not an expert in mini-filters at all, but just pointing out things
strange to me.
> What I have currently, is in a Post Operation Callback function,
Do you mean only Create request or any request?
>i will get some wierd characters like ‘??t?=02???’
>at the end of ‘Data->Iopb->TargetFileObject->FileName.Buffer’.
Maybe stupid question in driver forum, but just verifying: Do you know that
the string is not null terminated? Do you inspect
‘Data->Iopb->TargetFileObject->FileName.Length’ field for lenght (in bytes).
Also FileName in FILE_OBJECT is valid only during create operation, which is
not probably your problem.
Ho do you setup Reparse point? From User mode or kernel mode ?(
DeviceIoControl(), FltTagFile() or ZwFsControlFile()). It is intended to be
likely static information, so I hope you don’t setup it for each Create.
Maybe there are no answers because you didn’t provide enough info.
Good luck
-bg
—
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com