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

WdfDpcCancel メソッド

The WdfDpcCancel method attempts to cancel the execution of a DPC object's scheduled EvtDpcFunc callback function.

構文

BOOLEAN WdfDpcCancel(
  [in]  WDFDPC Dpc,
  [in]  BOOLEAN Wait
);

パラメーター

Dpc [in]

A handle to a framework DPC object.

Wait [in]

A Boolean value that, if TRUE, indicates that the WdfDpcCancel method will not return until the DPC object's EvtDpcFunc callback function is either canceled or finishes executing. If FALSE, the WdfDpcCancel method returns immediately.

戻り値

WdfDpcCancel returns TRUE if the specified DPC object's EvtDpcFunc callback function was in the system's DPC queue. The method returns FALSE if the callback function was not in the DPC queue, either because the callback function was executing or because it had finished executing.

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

解説

If the specified DPC object's EvtDpcFunc callback function is in the system's DPC queue, it is removed from the queue. If the EvtDpcFunc function is not in the queue, it is either executing or has finished executing.

If the Wait parameter is TRUE, WdfDpcCancel must be called at IRQL = PASSIVE_LEVEL. If the Wait parameter is FALSE, WdfDpcCancel can be called at any IRQL.

The following code example cancels the execution of the callback function that is associated with the DPC object that the code example in the WdfDpcCreate topic created.

WdfDpcCancel(
             PDevExt->CompleteWriteDpc,
             TRUE
             );

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfdpc.h (includeWdf.h)

ライブラリ

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

IRQL

See Remarks section.

参照

EvtDpcFunc

 

 

コミュニティの追加

表示:
© 2014 Microsoft