IRemoteTargetCallbackRemoval::OnRemoteTargetQueryRemove method (wudfddi.h)
[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]
A UMDF-based driver's OnRemoteTargetQueryRemove event callback function determines whether a remote I/O target's device can be stopped and removed.
Syntax
BOOL OnRemoteTargetQueryRemove(
[in] IWDFRemoteTarget *pWdfRemoteTarget
);
Parameters
[in] pWdfRemoteTarget
A pointer to the IWDFRemoteTarget interface of a remote target object that represents a remote I/O target. The driver obtains this pointer when it calls IWDFDevice2::CreateRemoteTarget.
Return value
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.
Remarks
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.
- Call IWDFRemoteTarget::CloseForQueryRemove.
- Return TRUE to indicate that the removal can occur.
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.
Requirements
Requirement | Value |
---|---|
End of support | Unavailable in UMDF 2.0 and later. |
Target Platform | Desktop |
Minimum UMDF version | 1.9 |
Header | wudfddi.h (include Wudfddi.h) |