How to communication between 2 drivers

Hi,

I know IoCallDriver can send an IRP to the next-lower-level driver.

But now I have 2 drivers - one (driver 1) is a usb driver and another (driver 2) doesn’t manipulate any hardware.
I want to know how to call the driver 1 in the driver 2 and the driver 1 can inform the driver 2 when the driver 1 is loaded.

For some reasons, I cannot merge these 2 drivers into one.
Thank you in advance.

-Ray Yang
ICQ: 26555015
eMail: xxxxx@yahoo.com
b???.???????&?v?'?ׯj?.n?Qyȩf??]?:.?˛???m??֛???zf???%y?ޞ?^?˛??^r*Lzfެ?…???l??ܢ

use IoGetRelatedDeviceObject( fileObject ) to get the object 1 of driver 1.
and use IoCallDriver directly in dirver 2. and remember use
IoBuildDeviceIoControlRequest. I think so. wish you have more idea.

Best Regards
Jansen Zhu.
----- Original Message -----
From: Ray Yang
To: NT Developers Interest List
Sent: Wednesday, December 13, 2000 4:25 PM
Subject: [ntdev] How to communication between 2 drivers

> Hi,
>
> I know IoCallDriver can send an IRP to the next-lower-level driver.
>
> But now I have 2 drivers - one (driver 1) is a usb driver and another
(driver 2) doesn’t manipulate any hardware.
> I want to know how to call the driver 1 in the driver 2 and the driver 1
can inform the driver 2 when the driver 1 is loaded.
>
> For some reasons, I cannot merge these 2 drivers into one.
> Thank you in advance.
>
> -Ray Yang
> ICQ: 26555015
> eMail: xxxxx@yahoo.com
> b‹š­ç.®·§¶\¬¹??Þv?µ×¯jÈڞǧΜŠØ³ëS¢éì¹??Þ±éÝi¹ZžG¦j)m¢Wš½éíuë÷ׯ
> ?-²‹+


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

For this purpose you can perform folowoing steps:

  1. get pointer to device in another derivet using IoGetDeviceObjectPointer
  2. build proprietray reguest using IoBuildDeviceIoControlReguest
    3 send request to another driver by IoCallDriver
    Best regards
    Mark

Ray Yang wrote:

Hi,

I know IoCallDriver can send an IRP to the next-lower-level driver.

But now I have 2 drivers - one (driver 1) is a usb driver and another (driver 2) doesn’t manipulate any hardware.
I want to know how to call the driver 1 in the driver 2 and the driver 1 can inform the driver 2 when the driver 1 is loaded.

For some reasons, I cannot merge these 2 drivers into one.
Thank you in advance.

-Ray Yang
ICQ: 26555015
eMail: xxxxx@yahoo.com
b‹š­ç.®·§¶\¬¹»®&ÞvÚ’µ×¯jÉš®F«ÅÊ&N‹§²æìr¸›zǧu¦åjy™¨¥¶‰^j÷§µ×¯ß½–±²‹+


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