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

# WdCancelRemoteDelete

> Reference for WdCancelRemoteDelete, which signals cancellation of the client wait for a WdDeleteRemoteFiles call, with syntax and remarks.

Signals cancellation of the client wait for a delete operation.

**Introduced in:** [RIT 0.0.13-preview](https://docs.xbox.com/reference/remoting/release-versions.md#release-versions).

## Syntax

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

### Parameters

`_In_ cancellationHandle`\
Type: **[WdCancellationHandle](https://docs.xbox.com/reference/remoting/structs/wdcancellationhandle.md)**

The cancellation handle created by [WdCreateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdcreatecancellationhandle.md) and passed to [WdDeleteRemoteFiles](https://docs.xbox.com/reference/remoting/functions/wddeleteremotefiles.md). 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](https://docs.xbox.com/reference/remoting/functions/wddeleteremotefiles.md) 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](https://docs.xbox.com/reference/remoting/functions/wddeleteremotefiles.md)
* [WdCancellationHandle](https://docs.xbox.com/reference/remoting/structs/wdcancellationhandle.md)
* [WdCreateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdcreatecancellationhandle.md)
* [WdCloseCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdclosecancellationhandle.md)
* [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)


## Related topics

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