Filter Manager: how to query a target FO?

Hello,

Filter Manager provides FltGetFileNameInformation() to query file name
from an operation callback, but I see nothing to query, for example,
file attributes or secirity info.

In a legacy filter, I would, simply roll out an IRP_MJ_QUERY_INFORMATION
irp and pass it to the attached FS device.

What is the recommended way of querying information on the
TargetFileObject in a minifilter callback?
I assume I could use FltCreateFile, etc., but is there a more efficient
way?

Thank you,

  • Vitaly

FltQueryInformationFile() is what you are looking for.

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 Vitaly Vatnikov
Sent: Wednesday, April 21, 2004 2:36 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Filter Manager: how to query a target FO?

Hello,

Filter Manager provides FltGetFileNameInformation() to query file name
from an operation callback, but I see nothing to query, for example,
file attributes or secirity info.

In a legacy filter, I would, simply roll out an IRP_MJ_QUERY_INFORMATION
irp and pass it to the attached FS device.

What is the recommended way of querying information on the
TargetFileObject in a minifilter callback?
I assume I could use FltCreateFile, etc., but is there a more efficient
way?

Thank you,

  • Vitaly

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

Thanks… Apparently I’m running with an old IFS kit since
FltQueryInformationFile() is not present in the headers nor exported by
fltmgr.sys on my W3K target…

  • Vitaly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Molly Brown
Sent: Wednesday, April 21, 2004 5:57 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Filter Manager: how to query a target FO?

FltQueryInformationFile() is what you are looking for.

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 Vitaly Vatnikov
Sent: Wednesday, April 21, 2004 2:36 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Filter Manager: how to query a target FO?

Hello,

Filter Manager provides FltGetFileNameInformation() to query file name
from an operation callback, but I see nothing to query, for example,
file attributes or secirity info.

In a legacy filter, I would, simply roll out an IRP_MJ_QUERY_INFORMATION
irp and pass it to the attached FS device.

What is the recommended way of querying information on the
TargetFileObject in a minifilter callback? I assume I could use
FltCreateFile, etc., but is there a more efficient way?

Thank you,

  • Vitaly

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


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

You are currently subscribed to ntfsd as: xxxxx@relicore.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Vitaly,

Go to betaplace (guestid: ‘Filtermgr’) for the latest Minifilter Kit.

Anyway, instead of FltQueryInformationFile( ) you can use:
FILE_STANDARD_INFORMATION stdInfo;

status = FltAllocateCallbackData( Instance, FileObject, &callbackData );
if ( !NT_SUCCESS( status )) return status;

callbackData->Iopb->MajorFunction = IRP_MJ_QUERY_INFORMATION;
callbackData->Iopb->Parameters.QueryFileInformation.FileInformationClass = FileStandardInformation;
callbackData->Iopb->Parameters.QueryFileInformation.Length = sizeof( FILE_STANDARD_INFORMATION );
callbackData->Iopb->Parameters.QueryFileInformation.InfoBuffer = &stdInfo;

FltPerformSynchronousIo( callbackData );
status = callbackData->IoStatus.Status;

FltFreeCallbackData( callbackData );
I wrote this code before than FltQueryInformationFile( ) has appeared.

Petr Kurtin

----- Original Message -----
From: “Vitaly Vatnikov”
To: “Windows File Systems Devs Interest List”
Sent: Thursday, April 22, 2004 12:31 AM
Subject: RE: [ntfsd] Filter Manager: how to query a target FO?

> Thanks… Apparently I’m running with an old IFS kit since
> FltQueryInformationFile() is not present in the headers nor exported by
> fltmgr.sys on my W3K target…
>
> - Vitaly
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Molly Brown
> Sent: Wednesday, April 21, 2004 5:57 PM
> To: Windows File Systems Devs Interest List
> Subject: RE: [ntfsd] Filter Manager: how to query a target FO?
>
>
> FltQueryInformationFile() is what you are looking for.
>
> 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 Vitaly Vatnikov
> Sent: Wednesday, April 21, 2004 2:36 PM
> To: Windows File Systems Devs Interest List
> Subject: [ntfsd] Filter Manager: how to query a target FO?
>
>
> Hello,
>
> Filter Manager provides FltGetFileNameInformation() to query file name
> from an operation callback, but I see nothing to query, for example,
> file attributes or secirity info.
>
> In a legacy filter, I would, simply roll out an IRP_MJ_QUERY_INFORMATION
> irp and pass it to the attached FS device.
>
> What is the recommended way of querying information on the
> TargetFileObject in a minifilter callback? I assume I could use
> FltCreateFile, etc., but is there a more efficient way?
>
> Thank you,
>
> - Vitaly
>
>
> —
> 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
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@relicore.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@asw.cz
> To unsubscribe send a blank email to xxxxx@lists.osr.com