> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WdCancelRemoteDelete

> WdCancelRemoteDelete

# WdCancelRemoteDelete

Signals cancellation of the client wait for a delete operation.

**Introduced in:** [RIT 0.0.13-preview](/reference/remoting/release-versions#release-versions).

## Syntax

```cpp theme={null}
HRESULT WdCancelRemoteDelete(  
         _In_ WdCancellationHandle cancellationHandle  
);  
```

### Parameters

`_In_ cancellationHandle`\
Type: **[WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle)**

The cancellation handle created by [WdCreateCancellationHandle](/reference/remoting/functions/wdcreatecancellationhandle) and passed to [WdDeleteRemoteFiles](/reference/remoting/functions/wddeleteremotefiles). Signaling this handle requests cancellation of the client wait.

### Return value

Type: **HRESULT**

Returns `S_OK` if successful; otherwise, returns an error code.

## Remarks

Call `WdCancelRemoteDelete` from a separate thread to signal cancellation of a blocking [WdDeleteRemoteFiles](/reference/remoting/functions/wddeleteremotefiles) call. `WdCancelRemoteDelete` is a non-blocking function. If `WdDeleteRemoteFiles` observes the signal, it stops waiting and returns `S_OK` without confirming endpoint completion.

Because observed cancellation and normal completion both return `S_OK`, a caller that may cancel can't determine the outcome from the return value alone. 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.

Cancellation does not stop deletion already started on the endpoint, which continues independently. It does not restore items that were already deleted.

## Requirements

| Requirement | Value |
| - | - |
| **Header** | WdRemoteIteration.h |
| **Library** | wdremoteapi.lib |
| **Supported OS** | Windows 11 and later |
| **Supported architectures** | x64, ARM64 |

## See also

* [WdDeleteRemoteFiles](/reference/remoting/functions/wddeleteremotefiles)
* [WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle)
* [WdCreateCancellationHandle](/reference/remoting/functions/wdcreatecancellationhandle)
* [WdCloseCancellationHandle](/reference/remoting/functions/wdclosecancellationhandle)
* [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdDeleteRemoteFiles](/reference/remoting/functions/wddeleteremotefiles.md)
- [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members.md)
- [WdCancelRemoteCopy](/reference/remoting/functions/wdcancelremotecopy.md)
- [XBOX PC Remote (wdRemote.exe)](/tools/tools-pc/commandlinetools/gr-wdRemote.md)
- [WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle.md)
