情報
要求されたトピックは次のとおりです。しかし、このトピックはこのライブラリには含まれていません。

CompletionRoutine

A driver's CompletionRoutine event callback function executes when another driver completes a specified I/O request.

構文

EVT_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine;

void CompletionRoutine(
  __in  WDFREQUEST Request,
  __in  WDFIOTARGET Target,
  __in  PWDF_REQUEST_COMPLETION_PARAMS Params,
  __in  WDFCONTEXT Context
)
{ ... }

パラメーター

Request [in]

A handle to a framework request object that represents the completed I/O request.

Target [in]

A handle to an I/O target object that represents the I/O target that completed the request.

Params [in]

A pointer to a WDF_REQUEST_COMPLETION_PARAMS structure that contains information about the completed request.

Context [in]

Driver-supplied context information, which the driver specified in a previous call to WdfRequestSetCompletionRoutine.

戻り値

None

解説

To register a CompletionRoutine callback function for an I/O request, a driver must call WdfRequestSetCompletionRoutine. For more information about this callback function, see Completing I/O Requests.

The function type is declared in Wdfrequest.h, as follows.

typedef VOID
  (EVT_WDF_REQUEST_COMPLETION_ROUTINE)(
    IN WDFREQUEST  Request,
    IN WDFIOTARGET  Target,
    IN PWDF_REQUEST_COMPLETION_PARAMS  Params,
    IN WDFCONTEXT  Context
    );

To define a CompletionRoutine callback function that is named MyCompletionRoutine, you must first provide a function declaration that SDV and other verification tools require, as follows:

EVT_WDF_REQUEST_COMPLETION_ROUTINE  MyCompletionRoutine;

Then, implement your callback function as follows:

VOID
 MyCompletionRoutine (
    IN WDFREQUEST  Request,
    IN WDFIOTARGET  Target,
    IN PWDF_REQUEST_COMPLETION_PARAMS  Params,
    IN WDFCONTEXT  Context
    )
  {...}

要件

バージョン

Supported by version 1.0 and later versions of KMDF.

ヘッダー

Wdfrequest.h (includeWdf.h)

IRQL

<=DISPATCH_LEVEL

参照

WdfRequestSetCompletionRoutine
WDF_REQUEST_COMPLETION_PARAMS

 

 

コミュニティの追加

表示:
© 2014 Microsoft