How to call other drivers IOCTL.

Hi,
I am a newbie in driver development.
I have a question regarding how to access other devices
from my driver. I read some of the previous posts regarding that but that
was unable to answer my question.

For making an ioctl call to a driver we need to use
IoBuildDeviceIoControlRequest, which takes one of the parameter as the
target device object. In case of filter drivers most of the time the
targets are underlying device objects.

My Question is how to get the device object for other devices to make an
ioctl call to them. The device may be a device managed by same driver or a
device managed by other driver.

Any help would be apreciated.

Thanks
Avi

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.

“Avinash Kumar” wrote in message news:xxxxx@ntdev…
>
> Hi,
> I am a newbie in driver development.
> I have a question regarding how to access other devices
> from my driver. I read some of the previous posts regarding that but that
> was unable to answer my question.
>
> For making an ioctl call to a driver we need to use
> IoBuildDeviceIoControlRequest, which takes one of the parameter as the
> target device object. In case of filter drivers most of the time the
> targets are underlying device objects.
>
> My Question is how to get the device object for other devices to make an
> ioctl call to them. The device may be a device managed by same driver or a
> device managed by other driver.
>
> Any help would be apreciated.
>
> Thanks
> Avi
>
>