HidClassFDO_DispatchRequest
2022-05-07
263
0
NTSTATUS
HidClassFDO_DispatchRequest(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PHIDCLASS_COMMON_DEVICE_EXTENSION CommonDeviceExtension;
NTSTATUS Status;
PIO_STACK_LOCATION IoStack;
//
// get device extension
//
CommonDeviceExtension = DeviceObject->DeviceExtension;
ASSERT(Irp->CurrentLocation > 0);
//
// create stack location
//
IoSetNextIrpStackLocation(Irp);
//
// get next stack location
//
IoStack = IoGetCurrentIrpStackLocation(Irp);
//
// store device object
//
IoStack->DeviceObject = DeviceObject;
//
// sanity check
//
ASSERT(CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction] != NULL);
//
// call driver
//
Status = CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction](DeviceObject, Irp);
//
// done
//
return Status;
}
IoSetNextIrpStackLocationion源代码
FORCEINLINE
VOID
IoSetNextIrpStackLocation (
_Inout_ PIRP Irp
)
/*--
Routine Description:
This routine is invoked to set the current IRP stack location to
the next stack location, i.e. it "pushes" the stack.
Arguments:
Irp - Pointer to the I/O Request Packet (IRP).
Return Value:
None.
--*/
{
NT_ASSERT(Irp->CurrentLocation > 0);
Irp->CurrentLocation--;
Irp->Tail.Overlay.CurrentStackLocation--;
}
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936