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

# WdCopyErrorCallback

> WdCopyErrorCallback

# WdCopyErrorCallback

コピー操作中にエラーおよび警告メッセージを報告するために呼び出されます。

## 構文

```cpp theme={null}
typedef HRESULT (*WdCopyErrorCallback)( 
    _In_ WdCopyErrorSeverity severity,
    _In_z_ const char* message,
    _In_ HRESULT error,
    _In_opt_ void* context
);
```

### パラメーター

`severity _In_`\
Type: **[WdCopyErrorSeverity](/reference/remoting/enums/wdcopyerrorseverity)**

メッセージの重大度 (Warning または Error)。

`message _In_z_`\
Type: **const char\***

診断メッセージを含む NULL 終端文字列。

`error _In_`\
Type: **HRESULT**

メッセージに関連付けられた HRESULT エラー コード。警告メッセージの場合は `S_OK`。

`context _In_opt_`\
Type: **void\***

[WdCopyStatusCallbacks](/reference/remoting/structs/wdcopystatuscallbacks) 構造体で指定されたユーザー定義のコンテキスト ポインター。

### 戻り値

Type: **HRESULT**

コピー操作を継続するには `S_OK` を返します。コピーを中止するには失敗を示す HRESULT を返します。

## 解説

このコールバックは、[WdRemoteCopy](/reference/remoting/functions/wdremotecopy) により、コピー操作中にエラーや警告などの診断メッセージを報告するために呼び出されます。`error` パラメーターは、エラー メッセージに関連付けられた HRESULT を提供します。警告メッセージの場合、`error` は `S_OK` です。

このコールバックは、`WdRemoteCopy` の呼び出しと同じスレッド上で呼び出されます。`message` 文字列は、コールバック呼び出しの間のみ有効です。

## 要件

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

## 関連項目

* [WdRemoteCopy](/reference/remoting/functions/wdremotecopy)
* [WdCopyErrorSeverity](/reference/remoting/enums/wdcopyerrorseverity)
* [WdCopyStatusCallbacks](/reference/remoting/structs/wdcopystatuscallbacks)
* [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdCopyErrorSeverity](/ja-jp/reference/remoting/enums/wdcopyerrorseverity.md)
- [WdCopyStatusCallbacks](/ja-jp/reference/remoting/structs/wdcopystatuscallbacks.md)
- [XBOX PC Remote Iteration API](/ja-jp/reference/remoting/remoteiteration_members.md)
- [WdCopyFilesStatusCallback](/ja-jp/reference/remoting/callbacks/wdcopyfilesstatuscallback.md)
- [WdRemoteCopy](/ja-jp/reference/remoting/functions/wdremotecopy.md)
