鼠标过滤驱动
我想写一个鼠标的过滤驱动,我的\Driver\mouclass下有四个设置,我刚开始想测试一下,所以所有的dispatch只是简单的把irp下发,中间显示一条debug信息,我用monitor把驱动挂上去后,只检测到一条IRP_MJ_CLOSE的irp流,根本检测不到IRP_MJ_READ流,但我把他挂到keyboard上的时候可以检测到IRP_MJ_READ流,驱动程序应该没问题,难道是鼠标的数据流不是通过IRP_MJ_READ流走的?
求大神出招~~ 过滤驱动 IRP流 鼠标
[解决办法]
curDeviceObject->Characteristics, FALSE, &filterDeviceObject);
if (!NT_SUCCESS(status)) {
KdPrint(("IoCreateDevice failed\n"));
} else {
lowerDeviceObject = IoAttachDeviceToDeviceStack(filterDeviceObject, curDeviceObject);
if (lowerDeviceObject == NULL) {
KdPrint(("IoAttachDeviceToDeviceStack failed\n"));
IoDeleteDevice(filterDeviceObject);
} else {
((PFILTER_EXT)filterDeviceObject->DeviceExtension)->LowerDeviceObject = lowerDeviceObject;
filterDeviceObject->Flags
[解决办法]
=
lowerDeviceObject->Flags & (DO_BUFFERED_IO
[解决办法]
DO_DIRECT_IO
[解决办法]
DO_POWER_PAGABLE);
filterDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
}
}
curDeviceObject = curDeviceObject->NextDevice;
}
}
不使用upperfilter,附加到mouseclass的
[解决办法]
鼠标过滤驱动http://download.csdn.net/detail/csdddn/4919992
mouclass代码http://download.csdn.net/detail/csdddn/5006432