Hello guys,
a TDI driver calls IoGetDeviceObjectPointer(
[name],
FILE_ALL_ACCESS,
&( gOTIMDumpModule.IMComm.pIMFileObject ),
&( gOTIMDumpModule.IMComm.pIMDevObject )
);
to get a pointer to a device object exported by a NDIS IM driver, much like passthru. This call succeeds.
struct
{
struct
{
PDEVICE_OBJECT pIMDevObject;
PFILE_OBJECT pIMFileObject;
}
IMComm;
}
gOTIMDumpModule;
Then the TDI driver wants to comunicate with the NDIS driver by calling IoBuildDeviceIoControlRequest with FALSE at the 3-rd last arg ( to build an IRP_MJ_DEVICE_CONTROL ). Then calls IoCallDriver.
The IoCallDriver returns STATUS_UNSUCCESSFULL.
Issuing the same calls, but the IoBuildDeviceIoControlRequest called with TRUE ( to set IRP_MJ_INTERNAL_DEVICE_CONTROL ), IoCallDriver succeeds and the NDIS IM is called through the device driver handler. Can anyone tell me what is the problem?
I really need to call the NDIS IM driver with IRP_MJ_DEVICE_CONTROL. Please tell me if it is possible.
Thank you