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

# WdDuplicateCancellationHandle

> WdDuplicateCancellationHandle

# WdDuplicateCancellationHandle

既存の [WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle) を複製します。

## 構文

```cpp theme={null}
HRESULT WdDuplicateCancellationHandle(  
         _In_ WdCancellationHandle cancellationHandle,  
         _Out_ WdCancellationHandle* duplicatedHandle  
);  
```

### パラメーター

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

複製するキャンセル ハンドル。

`_Out_ duplicatedHandle`\
Type: **[WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle)\***

複製されたキャンセル ハンドルを受け取ります。呼び出し元は、[WdCloseCancellationHandle](/reference/remoting/functions/wdclosecancellationhandle) を呼び出してこのハンドルを個別に閉じる必要があります。

### 戻り値

Type: **HRESULT**

成功した場合は `S_OK` を返します。それ以外の場合はエラー コードを返します。

## 解説

複数のコンポーネントが同じキャンセル ハンドルを参照する必要がある場合は、`WdDuplicateCancellationHandle` を使用します。元のハンドルと複製されたハンドルはどちらも同じキャンセル状態を参照しており、いずれかのハンドルで [WdCancelRemoteCopy](/reference/remoting/functions/wdcancelremotecopy) を介してキャンセルをシグナルすると、関連付けられた [WdRemoteCopy](/reference/remoting/functions/wdremotecopy) 操作がキャンセルされます。各ハンドルは [WdCloseCancellationHandle](/reference/remoting/functions/wdclosecancellationhandle) で個別に閉じる必要があります。

## 要件

| 要件                   | 値                   |
| -------------------- | ------------------- |
| **ヘッダー**             | WdRemoteIteration.h |
| **ライブラリ**            | wdremoteapi.lib     |
| **サポートされている OS**     | Windows 11 以降       |
| **サポートされているアーキテクチャ** | x64、ARM64           |

## 関連項目

* [WdCreateCancellationHandle](/reference/remoting/functions/wdcreatecancellationhandle)
* [WdCloseCancellationHandle](/reference/remoting/functions/wdclosecancellationhandle)
* [WdCancellationHandle](/reference/remoting/structs/wdcancellationhandle)
* [WdRemoteCopy](/reference/remoting/functions/wdremotecopy)
* [WdCancelRemoteCopy](/reference/remoting/functions/wdcancelremotecopy)
* [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdCancellationHandle](/ja-jp/reference/remoting/structs/wdcancellationhandle.md)
- [WdCloseCancellationHandle](/ja-jp/reference/remoting/functions/wdclosecancellationhandle.md)
- [WdCreateCancellationHandle](/ja-jp/reference/remoting/functions/wdcreatecancellationhandle.md)
- [XBOX PC Remote Iteration API](/ja-jp/reference/remoting/remoteiteration_members.md)
- [WdRemoteCopy](/ja-jp/reference/remoting/functions/wdremotecopy.md)
