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

# WdCancellationHandle

> 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](/reference/remoting/functions/wdcreatecancellationhandle).
2. Pass the handle to [WdRemoteCopy](/reference/remoting/functions/wdremotecopy) via the `cancellationHandle` parameter.
3. To cancel the in-progress copy, call [WdCancelRemoteCopy](/reference/remoting/functions/wdcancelremotecopy) with the handle from a separate thread.
4. After `WdRemoteCopy` returns, close the handle by calling [WdCloseCancellationHandle](/reference/remoting/functions/wdclosecancellationhandle).

A handle can be duplicated using [WdDuplicateCancellationHandle](/reference/remoting/functions/wdduplicatecancellationhandle). 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](/reference/remoting/functions/wdcreatecancellationhandle)
* [WdCloseCancellationHandle](/reference/remoting/functions/wdclosecancellationhandle)
* [WdDuplicateCancellationHandle](/reference/remoting/functions/wdduplicatecancellationhandle)
* [WdRemoteCopy](/reference/remoting/functions/wdremotecopy)
* [WdCancelRemoteCopy](/reference/remoting/functions/wdcancelremotecopy)
* [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdDuplicateCancellationHandle](/reference/remoting/functions/wdduplicatecancellationhandle.md)
- [WdCloseCancellationHandle](/reference/remoting/functions/wdclosecancellationhandle.md)
- [WdCreateCancellationHandle](/reference/remoting/functions/wdcreatecancellationhandle.md)
- [WdCancelRemoteCopy](/reference/remoting/functions/wdcancelremotecopy.md)
- [WdRemoteCopy](/reference/remoting/functions/wdremotecopy.md)
