WDF_IO_QUEUE_CONFIG structure (wdfio.h)

[Applies to KMDF and UMDF]

The WDF_IO_QUEUE_CONFIG structure contains configuration information for a framework queue object.

Syntax

typedef struct _WDF_IO_QUEUE_CONFIG {
  ULONG                                       Size;
  WDF_IO_QUEUE_DISPATCH_TYPE                  DispatchType;
  WDF_TRI_STATE                               PowerManaged;
  BOOLEAN                                     AllowZeroLengthRequests;
  BOOLEAN                                     DefaultQueue;
  PFN_WDF_IO_QUEUE_IO_DEFAULT                 EvtIoDefault;
  PFN_WDF_IO_QUEUE_IO_READ                    EvtIoRead;
  PFN_WDF_IO_QUEUE_IO_WRITE                   EvtIoWrite;
  PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL          EvtIoDeviceControl;
  PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL EvtIoInternalDeviceControl;
  PFN_WDF_IO_QUEUE_IO_STOP                    EvtIoStop;
  PFN_WDF_IO_QUEUE_IO_RESUME                  EvtIoResume;
  PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE       EvtIoCanceledOnQueue;
  union {
    struct {
      ULONG NumberOfPresentedRequests;
    } Parallel;
  } Settings;
  WDFDRIVER                                   Driver;
} WDF_IO_QUEUE_CONFIG, *PWDF_IO_QUEUE_CONFIG;

Members

Size

The length, in bytes, of this structure.

DispatchType

A WDF_IO_QUEUE_DISPATCH_TYPE enumerator that identifies the request dispatching type for the queue.

PowerManaged

A WDF_TRI_STATE-typed value that, if set to WdfTrue, indicates that the framework handles power management of the queue.

If set to WdfFalse, the driver must handle power management of the queue.

If set to WdfUseDefault, the framework handles power management for the queue unless the driver calls WdfFdoInitSetFilter.

Drivers above the power policy owner in the driver stack must not set the PowerManaged member to WdfTrue.

For more information about power-managed I/O queues, see Power Management for I/O Queues.

AllowZeroLengthRequests

A Boolean value that, if TRUE, indicates that the driver expects to receive read or write requests that have a buffer length of zero, so the framework delivers these requests to the driver. If FALSE, the framework does not deliver these requests to the driver; instead, it completes them with a completion status of STATUS_SUCCESS.

DefaultQueue

A Boolean value that, if TRUE, indicates that the queue will be the device's default I/O queue. If FALSE, the queue will not be the device's default queue.

EvtIoDefault

A pointer to the driver's queue-specific EvtIoDefault callback function, or NULL.

EvtIoRead

A pointer to the driver's queue-specific EvtIoRead callback function, or NULL.

EvtIoWrite

A pointer to the driver's queue-specific EvtIoWrite callback function, or NULL.

EvtIoDeviceControl

A pointer to the driver's queue-specific EvtIoDeviceControl callback function, or NULL.

EvtIoInternalDeviceControl

A pointer to the driver's queue-specific EvtIoInternalDeviceControl callback function, or NULL.

EvtIoStop

A pointer to the driver's queue-specific EvtIoStop callback function, or NULL.

EvtIoResume

A pointer to the driver's queue-specific EvtIoResume callback function, or NULL.

EvtIoCanceledOnQueue

A pointer to the driver's queue-specific EvtIoCanceledOnQueue callback function, or NULL.

Settings

Settings.Parallel

Settings.Parallel.NumberOfPresentedRequests

For the parallel dispatching method, the maximum number of I/O requests that the framework asynchronously delivers to the I/O queue's request handlers. For more information, see the following Remarks section. For the sequential and manual dispatching methods, this member must be zero. This member is available in version 1.9 and later versions of KMDF.

Driver

For internal use only. Set to NULL. This member is available in version 1.11 and later versions of KMDF.

Remarks

The driver must initialize the WDF_IO_QUEUE_CONFIG structure by calling WDF_IO_QUEUE_CONFIG_INIT or WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE.

The WDF_IO_QUEUE_CONFIG structure is used as an input parameter to WdfIoQueueCreate.

Beginning with version 1.9 of KMDF, drivers can use the NumberOfPresentedRequests member to specify the maximum number of I/O requests that the framework asynchronously delivers to a parallel I/O queue's request handlers. After the framework has delivered the specified number of I/O requests to the driver, it does not deliver more requests from the queue until the driver completes, cancels, or requeues at least one of the requests.

For parallel queues, WDF_IO_QUEUE_CONFIG_INIT and WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE set the NumberOfPresentedRequests member to its default value (-1), which indicates that the framework can deliver an unlimited number of I/O requests to the driver.

Requirements

Requirement Value
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfio.h (include Wdf.h)

See also

WDF_IO_QUEUE_CONFIG_INIT

WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE

WDF_IO_QUEUE_DISPATCH_TYPE

WdfIoQueueCreate

WdfIoQueueReadyNotify