Filter Driver - Not intercepting IRPís.

Posted: 09-01-2004, 04:33 PM
I am writing a File system Fileter driver to listen all the File
system calls.
In the Device Entry function, i am creating a device object and set it
in IO manager by IoAttachDeviceToDeviceStack method.
the code is...
ntStatus = IoCreateDevice(

pDevExt = (PDEVICE_EXTENSION) filterDeviceObject->DeviceExtension;
pDevExt->pDevice = filterDeviceObject; // back pointer
pDevExt->driver_state = Stopped;

LogEvent(ntStatus, filterDeviceObject, L"\nFilterDriver2.SYS:
Entering DriverEntry\n");

pDevExt->pTargetDevice = IoAttachDeviceToDeviceStack(
DriverObject is passed in the DriverEntry function.
Now, I am setting the flag for the filterDeviceObject by using,

pFilterDevObj->DeviceType = pDevExt->pTargetDevice->DeviceType;
pFilterDevObj->Characteristics =

pFilterDevObj->Flags |= ( pDevExt->pTargetDevice->Flags &

// Initialize Event Logging counters:
pDevExt->IrpRetryCount = 0;
pDevExt->IrpSequenceNumber = 0;

When setting the flag, the system crashes and restarts.

How to solve this

If I remove setting flags, I unable to intercept the IRPís.

How to do this

Thanks in advance.

-- This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
Visit Topic URL to contact author (reg. req'd). Report abuse:

Filter Driver - Not intercepting IRPís.

Responses to "Filter Driver - Not intercepting IRPís."

LinkBack Thread Tools Display Modes

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Identify a particular IRP from upper drivers in a filter driver Robert Windows XP Device Drivers 0 07-09-2004 01:39 AM
filter driver error - Windows XP Home pedagogy Windows XP Device Drivers 0 04-29-2004 03:05 AM
code 28 filter driver Windows XP Device Drivers 0 12-29-2003 01:27 AM
Lower Filter Driver to USB Composite Driver in Windows XP. Ramkumar C Windows XP Device Drivers 0 10-15-2003 05:17 AM
Filter driver Michael Windows XP Device Drivers 0 07-06-2003 04:59 PM