WDF_IO_QUEUE_CONFIG_INIT 函数

The WDF_IO_QUEUE_CONFIG_INIT function initializes a driver's WDF_IO_QUEUE_CONFIG structure.

语法

VOID WDF_IO_QUEUE_CONFIG_INIT(
  __out  PWDF_IO_QUEUE_CONFIG Config,
  __in   WDF_IO_QUEUE_DISPATCH_TYPE DispatchType
);

参数

Config [out]

A pointer to the driver's WDF_IO_QUEUE_CONFIG structure.

DispatchType [in]

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

返回值

None

评论

Drivers should call WDF_IO_QUEUE_CONFIG_INIT when creating a power-managed I/O queue that is not a device's default queue. The WDF_IO_QUEUE_CONFIG_INIT function zeros the specified WDF_IO_QUEUE_CONFIG structure and sets its Size member. It also sets the PowerManaged member to WdfUseDefault and stores the specified dispatching type in the DispatchType member.

Beginning with version 1.9 of KMDF, WDF_IO_QUEUE_CONFIG_INIT also sets the structure's NumberOfPresentedRequests member to -1.

示例

The following code example initializes WDF_IO_QUEUE_CONFIG structure and then calls WdfIoQueueCreate.

WDF_IO_QUEUE_CONFIG  queueConfig;
NTSTATUS  status = STATUS_SUCCESS;
WDFQUEUE  readQueue;

WDF_IO_QUEUE_CONFIG_INIT(
                         &queueConfig,
                         WdfIoQueueDispatchManual
                         );
status = WdfIoQueueCreate(
                          hDevice,
                          &queueConfig,
                          WDF_NO_OBJECT_ATTRIBUTES,
                          &readQueue
                          );

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfio.h (包括Wdf.h)

另请参见

WDF_IO_QUEUE_CONFIG
WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE
WDF_IO_QUEUE_DISPATCH_TYPE
WdfIoQueueCreate

 

 

社区附加资源

添加
显示:
© 2015 Microsoft