EVT_WDF_IO_TARGET_QUERY_REMOVE callback function (wdfiotarget.h)

[Applies to KMDF and UMDF]

A driver's EvtIoTargetQueryRemove event callback function indicates whether the framework can safely remove a specified remote I/O target's device.

Syntax

EVT_WDF_IO_TARGET_QUERY_REMOVE EvtWdfIoTargetQueryRemove;

NTSTATUS EvtWdfIoTargetQueryRemove(
  [in] WDFIOTARGET IoTarget
)
{...}

Parameters

[in] IoTarget

A handle to an I/O target object.

Return value

TheEvtIoTargetQueryRemove callback function must return STATUS_SUCCESS if the driver determines that the framework can safely remove the specified I/O target's device. Otherwise, this callback function must return STATUS_UNSUCCESSFUL.

Remarks

If a driver's EvtIoTargetQueryRemove callback function returns STATUS_SUCCESS, the system allows the I/O target's device to be removed, unless another driver returns STATUS_UNSUCCESSFUL.

To register an EvtIoTargetQueryRemove callback function, place the callback function's address in the I/O target's WDF_IO_TARGET_OPEN_PARAMS structure. The EvtIoTargetQueryRemove callback function is optional. Not supplying this callback function is equivalent to returning STATUS_SUCCESS.

The EvtIoTargetQueryRemove callback function must call WdfIoTargetCloseForQueryRemove, if the driver determines that the PnP manager can safely remove the target device.

The callback function must disable the driver's ability to send additional I/O requests to the I/O target.

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

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfiotarget.h (include Wdf.h)
IRQL PASSIVE_LEVEL

See also

EvtIoTargetRemoveCanceled

EvtIoTargetRemoveComplete

WDF_IO_TARGET_OPEN_PARAMS

WdfIoTargetCloseForQueryRemove