WdfIoQueueGetState メソッド

The WdfIoQueueGetState method returns the status of a specified I/O queue.

構文

WDF_IO_QUEUE_STATE WdfIoQueueGetState(
  [in]             WDFQUEUE Queue,
  [out, optional]  PULONG QueueRequests,
  [out, optional]  PULONG DriverRequests
);

パラメーター

Queue [in]

A handle to a framework queue object.

QueueRequests [out, optional]

A pointer to a location that receives the number of I/O requests that are currently in the I/O queue and have not been delivered to the driver. This pointer is optional and can be NULL.

DriverRequests [out, optional]

A pointer to a location that receives the number of I/O requests that have been delivered to the driver but that the driver has not completed or canceled. This pointer is optional and can be NULL.

戻り値

WdfIoQueueGetState returns a WDF_IO_QUEUE_STATE-typed value, which can contain the bitwise OR of several WDF_IO_QUEUE_STATE enumerators.

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

解説

After calling WdfIoQueueGetState, your driver can pass the received state value to the following functions, which are defined in Wdfio.h:

If your driver uses the framework's automatic synchronization, the I/O queue's status will not change between the time that the WdfIoQueueGetState method obtains status information from the framework and the time that the method returns. Otherwise the queue's status might change before the WdfIoQueueGetState method returns.

For more information about the WdfIoQueueGetState method, see Obtaining I/O Queue Properties.

The following code example is a routine that returns TRUE if a specified I/O queue is idle.

BOOLEAN
IsQueueIdle(
    IN WDFQUEUE Queue
    )
{
    WDF_IO_QUEUE_STATE queueStatus;
    queueStatus = WdfIoQueueGetState(
                                     Queue,
                                     NULL,
                                     NULL
                                     );
    return (WDF_IO_QUEUE_IDLE(queueStatus)) ? TRUE : FALSE;
}

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfio.h (includeWdf.h)

ライブラリ

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

IRQL

<= DISPATCH_LEVEL

参照

WDF_IO_QUEUE_STATE
EvtIoQueueState

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft