Bewerken

Delen via


WdfDeviceWdmDispatchIrpToIoQueue function (wdfdevice.h)

[Applies to KMDF and UMDF]

The WdfDeviceWdmDispatchIrpToIoQueue method forwards the IRP to a specified I/O queue.

Syntax

NTSTATUS WdfDeviceWdmDispatchIrpToIoQueue(
  [in] WDFDEVICE Device,
  [in] PIRP      Irp,
  [in] WDFQUEUE  Queue,
  [in] ULONG     Flags
);

Parameters

[in] Device

A handle to a framework device object.

[in] Irp

A pointer to an IRP structure.

[in] Queue

A handle to a framework queue object.

[in] Flags

A bitwise OR of WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS-typed flags.

Return value

The WdfDeviceWdmDispatchIrpToIoQueue method returns an NTSTATUS value that the framework or the driver provides as a result of processing the IRP. The driver must use this return value as the return value for the EvtDeviceWdmIrpDispatch or the EvtDeviceWdmIrpPreprocess callback function that called WdfDeviceWdmDispatchIrpToIoQueue.

A bug check occurs if a KMDF driver supplies an invalid object handle. If a UMDF driver supplies an invalid handle, the driver host process terminates.

Remarks

A driver calls WdfDeviceWdmDispatchIrpToIoQueue to specify a target queue for an incoming IRP.

The driver can call this method from its EvtDeviceWdmIrpPreprocess callback routine or from its EvtDeviceWdmIrpDispatch callback.

If the driver calls WdfDeviceWdmDispatchIrpToIoQueue from within a EvtDeviceWdmIrpPreprocess callback function, the driver must call either IoSkipCurrentIrpStackLocation or IoCopyCurrentIrpStackLocationToNext prior to calling WdfDeviceWdmDispatchIrpToIoQueue.

For more information about specifying queues for IRPs as they arrive, see Dispatching IRPs to I/O Queues.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.11
Minimum UMDF version 2.17
Header wdfdevice.h (include Wdf.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL <= DISPATCH_LEVEL
DDI compliance rules DriverCreate(kmdf), FwdIrpToIoQueueValid(kmdf)

See also

EvtDeviceWdmIrpDispatch

EvtDeviceWdmIrpPreprocess