Status_Reparse and FileObject.FileName etc...

Sorry bothering you again for topic already discussed here!
I’ve read all NTFSD archives about how to change the filename on the
fly in MJ_CREATE request, but my code has troubles. I am using Filemon
as sample. I want to replace for example file1.txt with file1.tx_ to
be opened. I have tried the following code:

if …
{
FilemonFreeHashEntry( FileObject );
FileObject->FileName.Buffer[(FileObject->FileName.Length/2) - 2] = L’_';
Irp->IoStatus.Status = STATUS_REPARSE;
Irp->IoStatus.Information = IO_REPARSE;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return STATUS_REPARSE;
}

FileObject->FileName haven’t changed at all (i am watching it),
and exception occurs too after completing the request. If I manually
continue execution after the exception, Notepad gives me
“Cannot open the file1.txt file. Make sure a disk is in the drive you
specified.”.

Could someone help me with an advice how to change FileObject->FileName
correctly and how to do correct REPARSE?

Thanks in advance,
-Svetoslav Enkov, Aivan7 GmbH

Hi,

New name of the file should contain device name,
for example \Device\HarddiskVolume1\file1.tx_, it allows you to redirect
request to another device.

Regards,
Alexei.

Status_Reparse and FileObject.FileName etc…

Body: Sorry bothering you again for topic already discussed here!
I’ve read all NTFSD archives about how to change the filename on the
fly in MJ_CREATE request, but my code has troubles. I am using Filemon
as sample. I want to replace for example file1.txt with file1.tx_ to
be opened. I have tried the following code:

if …
{
FilemonFreeHashEntry( FileObject );
FileObject->FileName.Buffer[(FileObject->FileName.Length/2) - 2] = L’_';
Irp->IoStatus.Status = STATUS_REPARSE;
Irp->IoStatus.Information = IO_REPARSE;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return STATUS_REPARSE;
}

FileObject->FileName haven’t changed at all (i am watching it),
and exception occurs too after completing the request. If I manually
continue execution after the exception, Notepad gives me
“Cannot open the file1.txt file. Make sure a disk is in the drive you
specified.”.

Could someone help me with an advice how to change FileObject->FileName
correctly and how to do correct REPARSE?

Thanks in advance,
-Svetoslav Enkov, Aivan7 GmbH

Thanks, Alexei!

Does ??\c:\test\file1.tx_ will work also?

Kind regards,
-Svetoslav Enkov,
Aivan7 GmbH

Hi,

New name of the file should contain device name,
for example \Device\HarddiskVolume1\file1.tx_, it allows you to redirect
request to another device.

Regards,
Alexei.

Status_Reparse and FileObject.FileName etc…

Body: Sorry bothering you again for topic already discussed here!
I’ve read all NTFSD archives about how to change the filename on the
fly in MJ_CREATE request, but my code has troubles. I am using Filemon
as sample. I want to replace for example file1.txt with file1.tx_ to
be opened. I have tried the following code:

if …
{
FilemonFreeHashEntry( FileObject );
FileObject->FileName.Buffer[(FileObject->FileName.Length/2) - 2] = L’_';
Irp->IoStatus.Status = STATUS_REPARSE;
Irp->IoStatus.Information = IO_REPARSE;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return STATUS_REPARSE;
}

FileObject->FileName haven’t changed at all (i am watching it),
and exception occurs too after completing the request. If I manually
continue execution after the exception, Notepad gives me
“Cannot open the file1.txt file. Make sure a disk is in the drive you
specified.”.

Could someone help me with an advice how to change FileObject->FileName
correctly and how to do correct REPARSE?

Thanks in advance,
-Svetoslav Enkov, Aivan7 GmbH

Only if the reparse is to a different volume.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alexei Jelvis
Sent: Monday, February 25, 2002 7:20 AM
To: File Systems Developers
Subject: [ntfsd] Re: Status_Reparse and FileObject.FileName etc…

Hi,

New name of the file should contain device name,
for example \Device\HarddiskVolume1\file1.tx_, it allows you to redirect
request to another device.

Regards,
Alexei.

Status_Reparse and FileObject.FileName etc…

Body: Sorry bothering you again for topic already discussed here! I’ve

read all NTFSD archives about how to change the filename on the fly in
MJ_CREATE request, but my code has troubles. I am using Filemon as
sample. I want to replace for example file1.txt with file1.tx_ to be
opened. I have tried the following code:

if …
{
FilemonFreeHashEntry( FileObject );
FileObject->FileName.Buffer[(FileObject->FileName.Length/2) - 2] =
FileObject->L’_';
Irp->IoStatus.Status = STATUS_REPARSE;
Irp->IoStatus.Information = IO_REPARSE;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return STATUS_REPARSE;
}

FileObject->FileName haven’t changed at all (i am watching it),
and exception occurs too after completing the request. If I manually
continue execution after the exception, Notepad gives me “Cannot open
the file1.txt file. Make sure a disk is in the drive you specified.”.

Could someone help me with an advice how to change FileObject->FileName

correctly and how to do correct REPARSE?

Thanks in advance,
-Svetoslav Enkov, Aivan7 GmbH


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To
unsubscribe send a blank email to %%email.unsub%%

How IO manager can find out that reparse is to the same volume? Based on
name you supplied?

Re: Status_Reparse and FileObject.FileName etc…

Only if the reparse is to a different volume.

Hi,

New name of the file should contain device name,
for example \Device\HarddiskVolume1\file1.tx_, it allows you to redirect
request to another device.