Problem in unloading the Filter driver

Hello,

I have written a filter driver which attaches itself with a device driver.
When i unload the filter
driver, I could not access the device driver directly.

The Un-load method() code is

VOID DriverUnload (
IN PDRIVER_OBJECT pDriverObject )
{
DbgPrint(“Encrypt Filter Driver :Unloading …”);
IoDetachDevice(((DEVICE_EXTENSION *)
(pDriverObject->DeviceObject->DeviceExtension) ) ->TargetDevice );

}

where I store the target device in the Device Extension of the filter
driver’s device object.

What is the problem with this unload routine. I’m not using any resources
since it is just a prototype driver.

Could anyone give any pointer to the development of the filter drivers?

Thanks in advance.

Regards,
Prabhakar


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi ,
There is something called raw mode in a device stack.
The mode of operation in which a device’s driver stack does not include a function driver. A device running in raw mode is being controlled primarily by the bus driver. Upper-level, lower-level, and/or bus filter drivers might be included in the driver stack.
If a bus driver can control a device in raw mode, it sets RawDeviceOK in the DEVICE_CAPABILITIES structure.

Picked this one from MSDN Hope it helps u

“PALANIVEL,PRABHAKAR (HP-India,ex2)” <prabhakar_palanivel> wrote: Hello,

I have written a filter driver which attaches itself with a device driver.
When i unload the filter
driver, I could not access the device driver directly.

The Un-load method() code is

VOID DriverUnload (
IN PDRIVER_OBJECT pDriverObject )
{
DbgPrint(“Encrypt Filter Driver :Unloading …”);
IoDetachDevice(((DEVICE_EXTENSION *)
(pDriverObject->DeviceObject->DeviceExtension) ) ->TargetDevice );

}

where I store the target device in the Device Extension of the filter
driver’s device object.

What is the problem with this unload routine. I’m not using any resources
since it is just a prototype driver.

Could anyone give any pointer to the development of the filter drivers?

Thanks in advance.

Regards,
Prabhakar


You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

---------------------------------
Do You Yahoo!?
Make a great connection at Yahoo! Personals.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</prabhakar_palanivel>