From: Mohit Gupta on
I have 2 drivers, and want one driver to communicate with another driver. How
can I achieve that?

For example, I have 2 drivers: Driver1 and Driver2.

The purposes of Driver1 is to allocate non-paged memory which it uses for
reading/writing purposes.

Driver2 would like to read from the same memory address created by Driver1
previously. Driver2 can do that only after know from Driver1 the address of
non-paged memory. How that can be achieved?

Few assumptions

1) Driver1 is loaded before Driver2

2) Driver1 and Driver2 has to work separately.

3) Only Driver1 can allocated memory

4) There is no pre-defined or hard-coded memory address used by Driver1 for
allocating memory.

Please help!!!
From: Don Burn on
There are a number of ways to do this. First you can create a device
interface (see IoRegisterDeviceInterface) the interface can contain
pointers to functions in Driver1 that can be called from Driver2 use
IoGetDeviceInterfaces to get the interface in Driver2. Another approach
is to have Driver2 open driver1 and send an IOCTL to it, the return is a
structures of pointers to the functions.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr



> -----Original Message-----
> From: Mohit Gupta [mailto:MohitGupta(a)discussions.microsoft.com]
> Posted At: Friday, June 18, 2010 3:42 AM
> Posted To: microsoft.public.development.device.drivers
> Conversation: Inter-driver communication
> Subject: Inter-driver communication
>
> I have 2 drivers, and want one driver to communicate with another
> driver. How
> can I achieve that?
>
> For example, I have 2 drivers: Driver1 and Driver2.
>
> The purposes of Driver1 is to allocate non-paged memory which it uses
> for
> reading/writing purposes.
>
> Driver2 would like to read from the same memory address created by
> Driver1
> previously. Driver2 can do that only after know from Driver1 the address
> of
> non-paged memory. How that can be achieved?
>
> Few assumptions
>
> 1) Driver1 is loaded before Driver2
>
> 2) Driver1 and Driver2 has to work separately.
>
> 3) Only Driver1 can allocated memory
>
> 4) There is no pre-defined or hard-coded memory address used by Driver1
> for
> allocating memory.
>
> Please help!!!
>
>
> __________ Information from ESET Smart Security, version of virus
> signature
> database 5206 (20100618) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>

From: Pavel A. on
In addition to Mr. Burn's advise, there are callbacks.
Read on ExCreateCallback, ExNotifyCallback.

-- pa/7


"Mohit Gupta" <MohitGupta(a)discussions.microsoft.com> wrote in message
news:18823529-ECBB-4D5B-9D6E-4CC6C7A9199B(a)microsoft.com...
> I have 2 drivers, and want one driver to communicate with another driver.
> How
> can I achieve that?
>
> For example, I have 2 drivers: Driver1 and Driver2.
>
> The purposes of Driver1 is to allocate non-paged memory which it uses for
> reading/writing purposes.
>
> Driver2 would like to read from the same memory address created by Driver1
> previously. Driver2 can do that only after know from Driver1 the address
> of
> non-paged memory. How that can be achieved?
>
> Few assumptions
>
> 1) Driver1 is loaded before Driver2
>
> 2) Driver1 and Driver2 has to work separately.
>
> 3) Only Driver1 can allocated memory
>
> 4) There is no pre-defined or hard-coded memory address used by Driver1
> for
> allocating memory.
>
> Please help!!!

From: Guilherme Moro on
http://www.osronline.com/article.cfm?id=24

http://www.osronline.com/article.cfm?id=177


On Jun 18, 4:42 am, Mohit Gupta <MohitGu...(a)discussions.microsoft.com>
wrote:
> I have 2 drivers, and want one driver to communicate with another driver. How
> can I achieve that?
>
> For example, I have 2 drivers: Driver1 and Driver2.
>
> The purposes of Driver1 is to allocate non-paged memory which it uses for
> reading/writing purposes.
>
> Driver2 would like to read from the same memory address created by Driver1
> previously. Driver2 can do that only after know from Driver1 the address of
> non-paged memory. How that can be achieved?
>
> Few assumptions
>
> 1) Driver1 is loaded before Driver2
>
> 2) Driver1 and Driver2 has to work separately.
>
> 3) Only Driver1 can allocated memory
>
> 4) There is no pre-defined or hard-coded memory address used by Driver1 for
> allocating memory.
>
> Please help!!!