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

# WdCloseCancellationHandle

> WdCloseCancellationHandle

Closes a cancellation handle created by [WdCreateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdcreatecancellationhandle.md).

## Syntax

```cpp theme={null}
void WdCloseCancellationHandle(  
         _In_ WdCancellationHandle cancellationHandle  
);  
```

### Parameters

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

The cancellation handle to close. After this call, the handle is no longer valid and must not be used.

### Return value

This function does not return a value.

## Remarks

Every handle created by [WdCreateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdcreatecancellationhandle.md) or duplicated by [WdDuplicateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdduplicatecancellationhandle.md) must be closed independently with `WdCloseCancellationHandle`. Close the handle after [WdRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md) has returned and the handle is no longer needed.

## 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)
* [WdDuplicateCancellationHandle](https://docs.xbox.com/reference/remoting/functions/wdduplicatecancellationhandle.md)
* [WdCancellationHandle](https://docs.xbox.com/reference/remoting/structs/wdcancellationhandle.md)
* [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)


## Related topics

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