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

# WdCloseCancellationHandle

> WdCloseCancellationHandle

# WdCloseCancellationHandle

Closes a cancellation handle created by [WdCreateCancellationHandle](/reference/remoting/functions/wdcreatecancellationhandle).

## Syntax

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

### Parameters

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

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](/reference/remoting/functions/wdcreatecancellationhandle) or duplicated by [WdDuplicateCancellationHandle](/reference/remoting/functions/wdduplicatecancellationhandle) must be closed independently with `WdCloseCancellationHandle`. Close the handle after [WdRemoteCopy](/reference/remoting/functions/wdremotecopy) 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](/reference/remoting/functions/wdcreatecancellationhandle)
* [WdDuplicateCancellationHandle](/reference/remoting/functions/wdduplicatecancellationhandle)
* [WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle)
* [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle.md)
- [WdCreateCancellationHandle](/reference/remoting/functions/wdcreatecancellationhandle.md)
- [WdDuplicateCancellationHandle](/reference/remoting/functions/wdduplicatecancellationhandle.md)
- [WdCancelRemoteCopy](/reference/remoting/functions/wdcancelremotecopy.md)
- [WdRemoteCopy](/reference/remoting/functions/wdremotecopy.md)
