TechTalkz.com Home

Go Back   Windows Help & Support > Windows Device Drivers
Home Register Forum Rules FAQ User Blogs Gallery

Inter-driver communication

Windows Device Drivers


Reply
 
LinkBack Thread Tools Display Modes
Old 06-18-2010, 08:30 AM   #1
Mohit Gupta
Guest
 
Posts: n/a
Default 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!!!

Advertisement

  Reply With Quote
Old 06-18-2010, 12:30 PM   #2
Don Burn
Guest
 
Posts: n/a
Default Re: Inter-driver communication

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@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
>


  Reply With Quote
Old 06-18-2010, 04:30 PM   #3
Pavel A.
Guest
 
Posts: n/a
Default Re: Inter-driver communication

Advertisement
In addition to Mr. Burn's advise, there are callbacks.
Read on ExCreateCallback, ExNotifyCallback.

-- pa/7


"Mohit Gupta" <MohitGupta@discussions.microsoft.com> wrote in message
news:18823529-ECBB-4D5B-9D6E-4CC6C7A9199B@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!!!



Advertisement

  Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help >


New To Site? Need Help?

All times are GMT. The time now is 01:31 AM.


vBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional