Redirecting file opening

Can I redirect the I/O calls, for ex) If user clicks c:\readme.txt, Can I
forward to d:\readme.txt with my filter driver.

Thanks
Ramaraj


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes you can. In IRP_MJ_CREATE handler that you’re filtering simply pass that
IRP down to D’s FSD instead of C’s.
You will also have to:
a) Change IrpSP->DeviceObject to D’s FSD device
b) Change FileObject->DeviceObject to D’s Disk DeviceObject (RealDevice from
D’s VPB)
c) Dereference whatever was original FileObject->DeviceObject
d) Make sure that there are enogh stack locations left in the IRP (because
D’s FS device may have bigger StackSize than C’s one)
e) If there are not enogh stack location in the IRP you will have to roll
your own Cereate IRP based on the original one
f) If IRP has failed down in the driver path roll back all the changes you
have made at a)-c)

Regards,

Vladimir

-----Original Message-----
From: Ramaraj Pandian [mailto:xxxxx@dvdjukebox.com]
Sent: Thursday, May 03, 2001 12:08 PM
To: File Systems Developers
Subject: [ntfsd] Redirecting file opening

Can I redirect the I/O calls, for ex) If user clicks c:\readme.txt, Can I
forward to d:\readme.txt with my filter driver.

Thanks
Ramaraj


You are currently subscribed to ntfsd as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks Vladimir, I hope this will apply for c:\ to cdrom device also. I will
try that
-ramaraj

-----Original Message-----
From: Chtchetkine, Vladimir [mailto:xxxxx@Starbase.com]
Sent: Thursday, May 03, 2001 2:06 PM
To: File Systems Developers
Subject: [ntfsd] RE: Redirecting file opening

Yes you can. In IRP_MJ_CREATE handler that you’re filtering simply pass that
IRP down to D’s FSD instead of C’s.
You will also have to:
a) Change IrpSP->DeviceObject to D’s FSD device
b) Change FileObject->DeviceObject to D’s Disk DeviceObject (RealDevice from
D’s VPB)
c) Dereference whatever was original FileObject->DeviceObject
d) Make sure that there are enogh stack locations left in the IRP (because
D’s FS device may have bigger StackSize than C’s one)

e) If there are not enogh stack location in the IRP you will have to roll
your own Cereate IRP based on the original one

f) If IRP has failed down in the driver path roll back all the changes you
have made at a)-c)

Regards,

Vladimir

-----Original Message-----
From: Ramaraj Pandian [ mailto:xxxxx@dvdjukebox.com
mailto:xxxxx ]
Sent: Thursday, May 03, 2001 12:08 PM
To: File Systems Developers
Subject: [ntfsd] Redirecting file opening

Can I redirect the I/O calls, for ex) If user clicks c:\readme.txt, Can I
forward to d:\readme.txt with my filter driver.

Thanks
Ramaraj


You are currently subscribed to ntfsd as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@dvdjukebox.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx>

Yes, use STATUS_REPARSE for it.

----- Original Message -----
From: “Ramaraj Pandian”
To: “File Systems Developers”
Sent: Thursday, May 03, 2001 11:07 PM
Subject: [ntfsd] Redirecting file opening

> Can I redirect the I/O calls, for ex) If user clicks c:\readme.txt, Can I
> forward to d:\readme.txt with my filter driver.
>
> Thanks
> Ramaraj
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

means Do I need to set reparse point for each and every files?
Goal: redirect files in particular folder say c:\RedirectFolder, this may
contain many sub folders and files.
Thanks
Ramaraj

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Thursday, May 03, 2001 3:15 PM
To: File Systems Developers
Subject: [ntfsd] Re: Redirecting file opening

Yes, use STATUS_REPARSE for it.

----- Original Message -----
From: “Ramaraj Pandian”
To: “File Systems Developers”
Sent: Thursday, May 03, 2001 11:07 PM
Subject: [ntfsd] Redirecting file opening

> Can I redirect the I/O calls, for ex) If user clicks c:\readme.txt, Can I
> forward to d:\readme.txt with my filter driver.
>
> Thanks
> Ramaraj
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: xxxxx@dvdjukebox.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> means Do I need to set reparse point for each and every files?

Goal: redirect files in particular folder say c:\RedirectFolder, this may
contain many sub folders and files.

No, update the file name in the file object to ??\c:\RedirectFolder and
complete the CREATE IRP with STATUS_REPARSE.

Max


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

forward ??\c:\RedirectFolder to \??\E:\folder
E:\ can be anything like hard disk or CDROM right??
Thanks
Ramaraj

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Thursday, May 03, 2001 4:40 PM
To: File Systems Developers
Subject: [ntfsd] Re: Redirecting file opening

means Do I need to set reparse point for each and every files?
Goal: redirect files in particular folder say c:\RedirectFolder, this may
contain many sub folders and files.

No, update the file name in the file object to ??\c:\RedirectFolder and
complete the CREATE IRP with STATUS_REPARSE.

Max


You are currently subscribed to ntfsd as: xxxxx@dvdjukebox.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

And set IoStatus.Information to IO_REPARSE.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Maxim S. Shatskih
Sent: Thursday, May 03, 2001 4:40 PM
To: File Systems Developers
Subject: [ntfsd] Re: Redirecting file opening

> means Do I need to set reparse point for each and every files?
> Goal: redirect files in particular folder say
c:\RedirectFolder, this may
> contain many sub folders and files.

No, update the file name in the file object to ??\c:\RedirectFolder and
complete the CREATE IRP with STATUS_REPARSE.

Max


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes. You can also use a fully qualified (canonical) path like:
\device\harddisk0\partition1\path\file.ext

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ramaraj Pandian
Sent: Thursday, May 03, 2001 4:56 PM
To: File Systems Developers
Subject: [ntfsd] Re: Redirecting file opening

forward ??\c:\RedirectFolder to \??\E:\folder
E:\ can be anything like hard disk or CDROM right??
Thanks
Ramaraj

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Thursday, May 03, 2001 4:40 PM
To: File Systems Developers
Subject: [ntfsd] Re: Redirecting file opening

> means Do I need to set reparse point for each and every files?
> Goal: redirect files in particular folder say
c:\RedirectFolder, this may
> contain many sub folders and files.

No, update the file name in the file object to ??\c:\RedirectFolder and
complete the CREATE IRP with STATUS_REPARSE.

Max


You are currently subscribed to ntfsd as: xxxxx@dvdjukebox.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com