I can’t figure out why this is making the computer crash. I’m
trying to spy on data sent from a usb joystick. It’s a lower
filter to hidusb.sys.
This is a section from an internal ioctl routine.
case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
{
KEVENT event ;DbgPrint(“URB Function:
URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER\n”) ;
KeInitializeEvent(&event, NotificationEvent, FALSE) ;
IoCopyCurrentIrpStackLocationToNext(Irp) ;
IoSetCompletionRoutine(Irp, (PIO_COMPLETION_ROUTINE)Complete,
&event, TRUE, TRUE, TRUE) ;
status = IoCallDriver(devExt->TopOfStack, Irp) ;
if (status == STATUS_PENDING)
{
DbgPrint(“Waiting for completion\n”) ;
KeWaitForSingleObject(&event, Executive, KernelMode, FALSE,
NULL) ;
DbgPrint(“Waiting Over\n”) ;
} ;// Irp->IoStatus.Status = status ;
// Irp->IoStatus.Information = 0 ;IoCompleteRequest(Irp, IO_NO_INCREMENT) ;
return Irp->IoStatus.Status ;
} ;
If I just pass it through the filter driver is fine. But with
this one section of code active the driver gives these results:
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
JoyFilter-> *Complete*
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
JoyFilter-> *Complete*
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
JoyFilter-> *Complete*
Waiting Over
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
Waiting Over
// Sixteen idential to the one above
URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
Waiting for completion
JoyFilter-> *Complete*
Waiting Over
Then the system seems to freeze but in a wierd way.
The mouse still moves and the system appears to be
ok but when you try to click on anything it doesn’t
give any results and then a few seconds later it
blue screens.
Can anyone offer any suggestions?