From: uba on
Hello,

I want to load a single driver as upper and lower filter. I had
modified the registry to include it as upper and lower.

I'm confused how to track in the driver whether the request is coming
from upper interface or lower interface.
Do I need to create two separate device objects for two filters?

Also, in this scenario can i have shared data between two filters?

Thanks nd Regards,
kid

From: Maxim S. Shatskih on
> Do I need to create two separate device objects for two filters?

Yes.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: uba on

> > Do I need to create two separate device objects for two filters?
>
> Yes.
>

So, two device objects, and two device contexts for saving data. So, I
need to compare for device object for processing any request.

Is there any way i can have shared data between two filters?

Thanks nd Regards,
kid





From: Asaf Shelly on
Hi,

The best way is to use two device objects. You can use any inter-process
communication, you can have one open a handle of the other, and you can have
both using the same file and thus both see the same globals.
(you can also look into IRP information)

Asaf
From: Maxim S. Shatskih on
> Is there any way i can have shared data between two filters?

1) maintain a global map-style assoc array of <PDO->lower> and <PDO->upper>.
or
2) call the internal IOCTL of your own down the stack, which will be handled in your lower DO.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com