Problem Facing in Bus Driver Testing
Kindly help me in this regard
Thanks in Advance
Problem :
In Plug and Play after the handling the request for Plug and Play
we are passing the Irp to the lower driver by calling IoCallDriver
(Ref: toaster sample of Win 200 DDK)
While using this IoCallDriver function the system gets crashed and
error message appears in the blue screen as
STOP: 0x0000001E (0xC0000005,0x80112BF0,0x00000000,0x0000001D)
KMODE_EXCEPTION_NOT_HANDLED
The PnP Function is :
NTSTATUS
Bus_FDO_PnP (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PIO_STACK_LOCATION IrpStack )
{
NTSTATUS status = STATUS_SUCCESS;
PDEVICE_EXTENSION pdx;
pdx = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
/* The Minor function requests are handled properly and Skeleton is given below */
switch (IrpStack->MinorFunction) {
case IRP_MN_START_DEVICE:
case IRP_MN_QUERY_STOP_DEVICE:
case IRP_MN_CANCEL_STOP_DEVICE:
case IRP_MN_STOP_DEVICE:
case IRP_MN_QUERY_REMOVE_DEVICE:
case IRP_MN_CANCEL_REMOVE_DEVICE:
case IRP_MN_SURPRISE_REMOVAL:
case IRP_MN_REMOVE_DEVICE:
case IRP_MN_QUERY_DEVICE_RELATIONS:
default:
break;
}
IoSkipCurrentIrpStackLocation(Irp);
status = IoCallDriver(pdx->LowerDeviceObject,Irp);
return status;
}
Options Attempted are listed below still the system get crashed with the same error message:
-
Instead of using
IoSkipCurrentIrpStackLocation(Irp);
we used
IoCopyCurrentIrpStackLocationToNext(Irp); -
Instead of using
IoSkipCurrentIrpStackLocation(Irp);
status = IoCallDriver(pdx->LowerDeviceObject,Irp);
we used
KEVENT event;
IoSkipCurrentIrpStackLocation(Irp);
IoSetCompletionRoutine(Irp, (PIO_COMPLETION_ROUTINE) OnRequestComplete, (PVOID) &event, TRUE, TRUE, TRUE );
status = IoCallDriver(pdx->LowerDeviceObject,Irp);
if (status == STATUS_PENDING)
{
/* Wait for completion*/
KeWaitForSingleObject(&event, Executive, KernelMode,FALSE, NULL );
return Irp->IoStatus.Status;
}
NTSTATUS
OnRequestComplete(PDEVICE_OBJECT fdo, PIRP pIrp, PKEVENT pKEvent )
{
KeSetEvent( pKEvent, 0,FALSE );
return STATUS_MORE_PROCESSING_REQUIRED;
}
I have tried using the WinDbg kernel Debugging Tool for this
i gave the command as
kbvs
it displays as
FramePtr RetAddr Param1 Param2 Param3 Function Name
fffffffff083bddc ffffffff80469bb2 ffffffff804190f0 0000000000000001 0000000000000000 NTOSKRNL!0xFFFFFFFF804559BC (No FPO)
0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 NTOSKRNL!0xFFFFFFFF80469BB2 (No FPO)
**************** CAUTION - Disclaimer *****************This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof.
*********** End of Disclaimer ***********DataPatterns ITS Group**********