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

# WdCancelRemoteCopy

> WdCancelRemoteCopy

# WdCancelRemoteCopy

取消正在进行的复制操作。

## 语法

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

### 参数

`_In_ cancellationHandle`\
类型：**[WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle)**

由 [WdCreateCancellationHandle](/reference/remoting/functions/wdcreatecancellationhandle) 创建并传递给 [WdRemoteCopy](/reference/remoting/functions/wdremotecopy) 的取消句柄。发出此句柄的信号将使正在进行的复制操作被取消。

### 返回值

类型：**HRESULT**

如果成功，则返回 `S_OK`；否则，返回错误代码。

## 备注

从单独的线程调用 `WdCancelRemoteCopy` 可取消阻塞的 [WdRemoteCopy](/reference/remoting/functions/wdremotecopy) 调用。`WdCancelRemoteCopy` 是一个非阻塞函数。在取消信号发出后，`WdRemoteCopy` 将取消复制并返回 `S_OK`。

## 要求

| 要求          | 值                   |
| ----------- | ------------------- |
| **头文件**     | WdRemoteIteration.h |
| **库**       | wdremoteapi.lib     |
| **支持的操作系统** | Windows 11 及更高版本    |
| **支持的体系结构** | x64、ARM64           |

## 另请参阅

* [WdRemoteCopy](/reference/remoting/functions/wdremotecopy)
* [WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle)
* [WdCreateCancellationHandle](/reference/remoting/functions/wdcreatecancellationhandle)
* [WdCloseCancellationHandle](/reference/remoting/functions/wdclosecancellationhandle)
* [XBOX PC 远程迭代 API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdRemoteCopy](/zh-CN/reference/remoting/functions/wdremotecopy.md)
- [WdCancellationHandle](/zh-CN/reference/remoting/structs/wdcancellationhandle.md)
- [WdCreateCancellationHandle](/zh-CN/reference/remoting/functions/wdcreatecancellationhandle.md)
- [WdDuplicateCancellationHandle](/zh-CN/reference/remoting/functions/wdduplicatecancellationhandle.md)
- [XBOX PC Remote Iteration API](/zh-CN/reference/remoting/remoteiteration_members.md)
