Filter Driver for Filtering Specific Files

Hey guys,

I am trying to develop a filter driver for filtering specific files.
I want to have a file with all the file names and want to read and match the
file names with the FileObject->FileName given by IRP.

If anyone know hoe to do so help me.

PFILE_OBJECT pFileObject = IoGetCurrentIrpStackLocation(Irp)->FileObject;

PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
//Check for FIlenames form “MyFileToBeChecked.txt”
if(Irp->RequestorMode == UserMode)
{
DbgPrint(“Writing to user file %wZ \n”, &pFileObject->FileName);
}

First you can’t do this on the write, file names are only trustworthy on the
IRP_MJ_CREATE. Second, why are you doing this with a legacy filter, use a
mini-filter take a look at the various samples in the WDK of mini-filters.
Finally, consider using the registry for the list of files, a file for this
type of configuration data is not a normal windows model.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Tuesday, April 01, 2014 8:50 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Filter Driver for Filtering Specific Files

Hey guys,

I am trying to develop a filter driver for filtering specific files.
I want to have a file with all the file names and want to read and match the
file names with the FileObject->FileName given by IRP.

If anyone know hoe to do so help me.

PFILE_OBJECT pFileObject = IoGetCurrentIrpStackLocation(Irp)->FileObject;

PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
//Check for FIlenames form “MyFileToBeChecked.txt”
if(Irp->RequestorMode == UserMode)
{
DbgPrint(“Writing to user file %wZ \n”, &pFileObject->FileName); }


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer