Hi,
I am writing a filter driver. I need to determine if a file coming in for
IRP_MJ_CREATE has the OFFLINE attribute set. If the attribute is set I
will then need to write some data to the file before the handle is returned
back to the caller. How do I determine the attributes of the file? So
far I have tried to open the file to read the attributes, the request comes
back to my driver again. My driver does not know that the request is an
internal and tries to get the attribute again.
I have tried another method that works but I wondered if it is the best way
of doing it. I wrote a separate application that opens the file and checks
the attribute. The driver communicates with the application to find the
attributes of the file. When the application tries to open the file, the
driver will check the process id and ignore that request.
Is there is a better way of doing it?
Thanks in advance
Seema Gupta
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
set completion routine for create and Query file with file object by
building irp
(or) make it synch. in create path itself then query file.
-Ramaraj
-----Original Message-----
From: xxxxx@verizon.net [mailto:xxxxx@verizon.net]
Sent: Friday, July 20, 2001 8:40 AM
To: File Systems Developers
Subject: [ntfsd] How to check attribute of a file during IRP_MJ_CREATE
Hi,
I am writing a filter driver. I need to determine if a file coming in for
IRP_MJ_CREATE has the OFFLINE attribute set. If the attribute is set I
will then need to write some data to the file before the handle is returned
back to the caller. How do I determine the attributes of the file? So
far I have tried to open the file to read the attributes, the request comes
back to my driver again. My driver does not know that the request is an
internal and tries to get the attribute again.
I have tried another method that works but I wondered if it is the best way
of doing it. I wrote a separate application that opens the file and checks
the attribute. The driver communicates with the application to find the
attributes of the file. When the application tries to open the file, the
driver will check the process id and ignore that request.
Is there is a better way of doing it?
Thanks in advance
Seema Gupta
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
Yes. Just send an IRP_MJ_QUERY_INFORMATION to the lower driver, by
allocating your own IRP. This is really simple, and works.
Regards, Dejan.
xxxxx@verizon.net wrote:
Hi,
I am writing a filter driver. I need to determine if a file coming in for
IRP_MJ_CREATE has the OFFLINE attribute set. If the attribute is set I
will then need to write some data to the file before the handle is returned
back to the caller. How do I determine the attributes of the file? So
far I have tried to open the file to read the attributes, the request comes
back to my driver again. My driver does not know that the request is an
internal and tries to get the attribute again.
I have tried another method that works but I wondered if it is the best way
of doing it. I wrote a separate application that opens the file and checks
the attribute. The driver communicates with the application to find the
attributes of the file. When the application tries to open the file, the
driver will check the process id and ignore that request.
Is there is a better way of doing it?
Thanks in advance
Seema Gupta
You are currently subscribed to ntfsd as: xxxxx@alfasp.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
–
Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
E-mail: xxxxx@alfasp.com
ICQ#: 56570367
Professional file&system related components and libraries for Win32 developers.
Alfa File Monitor - #1 file monitoring system for Win32 developers.
Alfa File Protector - #1 file protection and hiding system for Win32
developers.
Alfa Units - #1 file and system handling units for Delphi.
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