Calling one Driver function from another

HI ALL,
I have a SCSI Miniport Driver and i am planning to write another Kernal
Driver. These two Drivers need to communicate with each other and
should be able to call each other’s functions through IOCTL like interface.
Is this possbile to do in NT and 2000???
If it is possible (in any of OS) where can i get more information about
this???

thanks in advance.
ajitabh

You can use IRP_MJ_DEVICE_CONTROL\IRP_MJ_INTERNAL_DEVICE_CONTROL with
IoBuildDeviceIoControlRequest.

Gilad

-----Original Message-----
From: Saxena, Ajitabh Prakash [mailto:xxxxx@lsil.com]
Sent: Sat, November 09, 2002 3:12 PM
To: NT Developers Interest List
Subject: [ntdev] Calling one Driver function from another

HI ALL,
I have a SCSI Miniport Driver and i am planning to write another Kernal
Driver. These two Drivers need to communicate with each other and
should be able to call each other's functions through IOCTL like interface.
Is this possbile to do in NT and 2000???
If it is possible (in any of OS) where can i get more information about
this???

thanks in advance.
ajitabh

You are currently subscribed to ntdev as: xxxxx@appstream.com
To unsubscribe send a blank email to %%email.unsub%%

Gilad,

Not really. Remember that the SCSI mini-port is a DLL to SCSIPORT, compiled without Ntddk.h, therefore CANNOT use IoCallDriver, and is totally oblivious to anything IRP_XXXX. One driver can use IoCallDriver to pass IOCTL_SCSI_MINIPORT commands and IOCT_SCSI_PASSTHROUGH (???) commands to the mini-port, but the mini-port is not permitted to use IoCallDriver.

The best that can be done is to create an import lib between the two drivers with entry poinots and then use that for mutual or primary control.


Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
“Gilad Ben-Zeev” wrote in message news:xxxxx@ntdev…
You can use IRP_MJ_DEVICE_CONTROL\IRP_MJ_INTERNAL_DEVICE_CONTROL with IoBuildDeviceIoControlRequest.

Gilad

-----Original Message-----
From: Saxena, Ajitabh Prakash [mailto:xxxxx@lsil.com]
Sent: Sat, November 09, 2002 3:12 PM
To: NT Developers Interest List
Subject: [ntdev] Calling one Driver function from another

HI ALL,

I have a SCSI Miniport Driver and i am planning to write another Kernal Driver. These two Drivers need to communicate with each other and

should be able to call each other’s functions through IOCTL like interface. Is this possbile to do in NT and 2000???

If it is possible (in any of OS) where can i get more information about this???

thanks in advance.

ajitabh


You are currently subscribed to ntdev as: xxxxx@appstream.com
To unsubscribe send a blank email to %%email.unsub%%

Nearly no, due to SCSI miniport context limitations.
To get rid of them, you can purchase our VSPORT product, which is a SCSIPORT replacement library for non-hardware miniports - iSCSI and such.

Max
----- Original Message -----
From: Saxena, Ajitabh Prakash
To: NT Developers Interest List
Sent: Sunday, November 10, 2002 2:11 AM
Subject: [ntdev] Calling one Driver function from another

HI ALL,
I have a SCSI Miniport Driver and i am planning to write another Kernal Driver. These two Drivers need to communicate with each other and
should be able to call each other's functions through IOCTL like interface. Is this possbile to do in NT and 2000???
If it is possible (in any of OS) where can i get more information about this???

thanks in advance.
ajitabh

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%

Yes in 2000.

I have two drivers which need to do the same thing. Since you can make no assumptions as to when the PnP Manager will enumerate and start your drivers, you need to have them registered to received PnP Notification on events, such as arrival, removal, etc… You also need to have your drivers register and start/stop their interfaces, whhich triggers the different events.

The toaster sample provides an example of how this is done in it the ToastMon driver. Look at the ToastMon.c file to find a full example on how to register and unregister for PnP Notification, as well as the processing you need to perform to get the device object for the other driver.
“Saxena, Ajitabh Prakash” wrote in message news:xxxxx@ntdev…
HI ALL,
I have a SCSI Miniport Driver and i am planning to write another Kernal Driver. These two Drivers need to communicate with each other and
should be able to call each other’s functions through IOCTL like interface. Is this possbile to do in NT and 2000???
If it is possible (in any of OS) where can i get more information about this???

thanks in advance.
ajitabh