[Applies to UMDF 1.x only]
A UMDF-based driver's OnRemoteTargetQueryRemove event callback function determines whether a remote I/O target's device can be stopped and removed.
- pWdfRemoteTarget [in]
If the driver determines that the device can be stopped and removed, the OnRemoteTargetQueryRemove event callback function must return TRUE. Otherwise, the callback function must return FALSE.
If your driver provides an OnRemoteTargetQueryRemove event callback function, the callback function should determine if the operating system should allow removal of the device. If the driver determines that the device can be removed, it should do the following:
Do any driver-specific actions needed to stop I/O to the remote target.
Return TRUE to indicate that the removal can occur.
If the driver determines that the device should not be removed, the callback function must return FALSE. Typically, drivers should avoid returning FALSE, because a FALSE return value can cause Windows to restart.
If the driver does not provide this callback function, the framework calls IWDFRemoteTarget::CloseForQueryRemove for the driver. In other words, the framework always allows the device to be removed unless the driver provides an OnRemoteTargetQueryRemove event callback function.
For more information about the OnRemoteTargetQueryRemove event callback function, see Controlling a General I/O Target's State in UMDF.
End of support
|Unavailable in UMDF 2.0 and later.|
Minimum UMDF version