Discussion:
Inter-driver communication
(too old to reply)
Mohit Gupta
2010-06-18 07:42:13 UTC
Permalink
I have 2 drivers, and want one driver to communicate with another driver. How
can I achieve that?

For example, Driver1 and Driver2 are running in the system

Driver1 allocates non-paged memory for reading/writing purposes

Driver2 wants to read from non-paged memory address created by Driver1.
Driver2 can do that only after knowing memory access address (virtual or
physical) from Driver1. How that can be achieved?

Few assumptions

1) Driver1 is loaded before Driver2

2) Reads/writes are synchronised.

3) Only Driver1 can allocated memory

4) Memory allocation must be dynamic. No address is known to either drivers

Please help!!!
Don Burn
2010-06-18 12:00:02 UTC
Permalink
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-----
Posted At: Friday, June 18, 2010 3:42 AM
Posted To: microsoft.public.win32.programmer.kernel
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, Driver1 and Driver2 are running in the system
Driver1 allocates non-paged memory for reading/writing purposes
Driver2 wants to read from non-paged memory address created by Driver1.
Driver2 can do that only after knowing memory access address (virtual or
physical) from Driver1. How that can be achieved?
Few assumptions
1) Driver1 is loaded before Driver2
2) Reads/writes are synchronised.
3) Only Driver1 can allocated memory
4) Memory allocation must be dynamic. No address is known to either drivers
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
Continue reading on narkive:
Loading...