I installed a lower disk filter driver. I need to see the IOCTLs being issued by the class driver. class driver sends IOCTL_SCSI_EXECUTE_NONE in it’s AddDevice -> ClassClaimDevice routine. But my lower filter driver never get to meet this ioctl. Even though I see in the debugger that ClassClaimDevice (LowerDeviceObject, Release) was called with the device object of my lower filter driver. I verified in the debugger that my lower filter created device object is in the stack at the correct place. Following is my code. Is lower filter driver the correct place to capture this ioctl ?
NTSTATUS
LowerFltrDeviceControl(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
)
{
PDEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension;
PIO_STACK_LOCATION currentIrpStack = IoGetCurrentIrpStackLocation(Irp);
if (currentIrpStack->Parameters.DeviceIoControl.IoControlCode ==
IOCTL_SCSI_EXECUTE_NONE) {
// I never get here
DbgPrintEx (DPFLTR_IHVDRIVER_ID,
DPFLTR_ERROR_LEVEL,
“IOCTL_SCSI_EXECUTE_NONE detected\n”);
}
return (LowerFltrSendToNextDriver (DeviceObject, Irp));
}