WdfIoQueueStop 方法

The WdfIoQueueStop method prevents an I/O queue from delivering I/O requests, but the queue receives and stores new requests.

语法

VOID WdfIoQueueStop(
  [in]  WDFQUEUE Queue,
        PFN_WDF_IO_QUEUE_STATE StopComplete,
        WDFCONTEXT Context
);

参数

Queue [in]

A handle to a framework queue object.

StopComplete

A pointer to a driver-supplied EvtIoQueueState callback function. This parameter is optional and can be NULL.

Context

An untyped pointer to driver-supplied context information that the framework passes to the EvtIoQueueState callback function. This parameter is optional and can be NULL.

返回值

None.

A bug check occurs if the driver supplies an invalid object handle.

评论

If the driver supplies an EvtIoQueueState callback function, the framework calls it after all requests that were delivered to the driver have been completed or canceled.

The WdfIoQueueStop method enables the queue to receive new requests, even if the queue was not receiving new requests before the driver called WdfIoQueueStop. For example, a driver might call WdfIoQueueDrain, which causes the framework to stop adding new I/O requests to the queue. The driver's subsequent call of WdfIoQueueStop causes the framework to resume adding requests to the queue.

For more information about the WdfIoQueueStop method, see Managing I/O Queues.

示例

The following code example stops a specified I/O queue. After the framework has stopped the queue, it calls a driver's EvtIoQueueStateStop function.

WDFCONTEXT stopContext;

stopContext = &myContext;

WdfIoQueueStop(
               queue,
               EvtIoQueueStateStop,
               stopContext
               );

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfio.h (包括Wdf.h)

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<= DISPATCH_LEVEL

另请参见

WdfIoQueueStopSynchronously
WdfIoQueueStart
EvtIoQueueState

 

 

社区附加资源

添加
显示:
© 2015 Microsoft