信息
您所需的主题如下所示。但此主题未包含在此库中。

EvtIoTargetRemoveComplete

A driver's EvtIoTargetRemoveComplete event callback function performs operations when the removal of a specified remote I/O target is complete.

语法

EVT_WDF_IO_TARGET_REMOVE_COMPLETE EvtIoTargetRemoveComplete;

VOID EvtIoTargetRemoveComplete(
  __in  WDFIOTARGET IoTarget
)
{ ... }

参数

IoTarget [in]

A handle to an I/O target object.

返回值

None

评论

To register an EvtIoTargetRemoveComplete callback function, place the callback function's address in the I/O target's WDF_IO_TARGET_OPEN_PARAMS structure.

The framework calls your driver's EvtIoTargetRemoveComplete callback function after the driver's EvtIoTargetQueryRemove callback function returns STATUS_SUCCESS, or after the device has been removed unexpectedly (surprise-removed).

A driver's EvtIoTargetRemoveComplete callback function must permanently close the remote I/O target by calling WdfIoTargetClose. Because the target device has been removed, the EvtIoTargetRemoveComplete callback function should also perform any additional target-removal operations that might be necessary, such as releasing system resources that the driver might have allocated when it opened the target.

The EvtIoTargetRemoveComplete callback function is optional. If the driver does not supply this callback function, the framework permanently closes the I/O target.

For more information about the EvtIoTargetRemoveComplete callback function, see Controlling a General I/O Target's State.

示例

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

typedef VOID
  (EVT_WDF_IO_TARGET_REMOVE_COMPLETE)(
    IN WDFIOTARGET  IoTarget
    );

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

EVT_WDF_IO_TARGET_REMOVE_COMPLETE  MyIoTargetRemoveComplete;

Then, implement your callback function as follows:

VOID
 MyIoTargetRemoveComplete (
    IN WDFIOTARGET  IoTarget
    )
  {...}

要求

版本

Supported by version 1.0 and later versions of KMDF.

标头

WdfIoTarget.h (包括Wdf.h)

IRQL

PASSIVE_LEVEL

另请参见

EvtIoTargetRemoveCanceled
EvtIoTargetQueryRemove
WDF_IO_TARGET_OPEN_PARAMS
WdfIoTargetClose

 

 

社区附加资源

显示:
© 2014 Microsoft