> ## 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.

# WdCancellationHandle

> WdCancellationHandle

An opaque handle used to cancel an in-progress copy operation.

## Syntax

```cpp theme={null}
typedef struct WdCancellationHandleImpl* WdCancellationHandle;
```

## Remarks

`WdCancellationHandle` is a typedef pointer to an opaque internal structure. The caller is responsible for managing the handle lifecycle:

1. Create a handle by calling [WdCreateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdcreatecancellationhandle.md).
2. Pass the handle to [WdRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md) via the `cancellationHandle` parameter.
3. To cancel the in-progress copy, call [WdCancelRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdcancelremotecopy.md) with the handle from a separate thread.
4. After `WdRemoteCopy` returns, close the handle by calling [WdCloseCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdclosecancellationhandle.md).

A handle can be duplicated using [WdDuplicateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdduplicatecancellationhandle.md). Each copy of the handle must be closed independently with `WdCloseCancellationHandle`.

## Requirements

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

## See also

* [WdCreateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdcreatecancellationhandle.md)
* [WdCloseCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdclosecancellationhandle.md)
* [WdDuplicateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdduplicatecancellationhandle.md)
* [WdRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md)
* [WdCancelRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdcancelremotecopy.md)
* [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)


## Related topics

- [WdDuplicateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdduplicatecancellationhandle.md)
- [WdCloseCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdclosecancellationhandle.md)
- [WdCreateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdcreatecancellationhandle.md)
- [WdCancelRemoteDelete](https://docs.xbox.com/reference/remoting/functions/wdcancelremotedelete.md)
- [WdCancelRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdcancelremotecopy.md)
