WdCancelRemoteCopy
Cancels an in-progress copy operation.Syntax
Parameters
_In_ cancellationHandleType: WdCancellationHandle The cancellation handlecreated by WdCreateCancellationHandle and passed to WdRemoteCopy. Signaling this handle causes the in-progress copy to be cancelled.
Return value
Type: HRESULT ReturnsS_OK if successful; otherwise, returns an error code.
Remarks
CallWdCancelRemoteCopy from a separate thread to cancel a blocking WdRemoteCopy call. WdCancelRemoteCopy is a non-blocking function that signals cancellation; WdRemoteCopy may return S_OK or a failure.
Because WdRemoteCopy may return either result after cancellation is observed, the return value alone doesn’t indicate whether the operation was cancelled or ran to completion. Track cancellation state in your own code if you need to distinguish the two — for example, to suppress an error message or skip a retry after a user-initiated cancel.
