FltQueryDirectoryFile?

What function should be used for querying a directory in the mini filter?
ZwQueryDirectoryFile?

The is now a FltQueryInformationFile in istead of ZwQueryInformationFile,
shouldn’t there be a FltQueryDirectoryFile?

If I call ZwQueryDirectoryFile after opening the file with FltCreateFile the
query will not come down through the top of the stack, yes?

Ken

Well, someday there may be a FltQueryDirectoryFile. We prioritized the
type of operations which filters do most frequently and wrote Flt
wrappers for those operations (like FltReadFile, FltWriteFile,
FltQueryInformationFile).

You have two options to get the non-recursive behavior you want:

  1. Open a handle directed to below your instance using FltCreateFile,
    then call ZwQueryDirectoryFile with that handle. The IO will be
    properly directed to all filters below you.

  2. Roll your own IRP_MJ_DIRECTORY_CONTROL, IRP_MN_QUERY_DIRECTORY
    callback data structure, then call FltPerformSynchronousIo. You just
    need to setup the FileObject, Instance and operation parameters in the
    callback data structure, then the filter manager does the rest to
    generate the IO and send it down the stack.

Regards,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Thursday, August 05, 2004 8:59 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FltQueryDirectoryFile?

What function should be used for querying a directory in the mini
filter? ZwQueryDirectoryFile?

The is now a FltQueryInformationFile in istead of
ZwQueryInformationFile, shouldn’t there be a FltQueryDirectoryFile?

If I call ZwQueryDirectoryFile after opening the file with FltCreateFile
the query will not come down through the top of the stack, yes?

Ken


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com

To unsubscribe send a blank email to xxxxx@lists.osr.com

hi,

I am writing an Encryption/Decryption Driver. I encrypt data during
IRP_MJ_WRITE. I have a trailer after the file data which contains metadata
for my driver use. Since the file size is increased after encryption then i
increase the file size during IRP_MJ_SET_INFORMATION.

PROBLEM :-
I see the EOF and valid data length as different. Basically EOF is correct
but Valid data length is wrong (less then EOF) which causes the end of my
trailer to be zeros.

I am changing the File size and allocation size when IRP_PAGING_IO is not
set. I want to know what do i need to do for making my Valid Data Length to
be of correct value. Is there any other place where i need to set file size
or valid data length?

Thanks
Suhail


On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

hi,

I am writing an Encryption/Decryption Driver. I encrypt data during
IRP_MJ_WRITE. I have a trailer after the file data which contains metadata
for my driver use. Since the file size is increased after encryption then i
increase the file size during IRP_MJ_SET_INFORMATION.

PROBLEM :-
I see the EOF and valid data length as different. Basically EOF is correct
but Valid data length is wrong (less then EOF) which causes the end of my
trailer to be zeros.

I am changing the File size and allocation size when IRP_PAGING_IO is not
set. I want to know what do i need to do for making my Valid Data Length to
be of correct value. Is there any other place where i need to set file size
or valid data length?

Thanks
Suhail


Get ready for school! Find articles, homework help and more in the Back to
School Guide! http://special.msn.com/network/04backtoschool.armx