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

# WdTerminateRemoteGame

> WdTerminateRemoteGame

# WdTerminateRemoteGame

リモート デバイス上で [WdLaunchRemoteGame](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdlaunchremotegame.md) を使用して最後に起動されたゲームを終了します。

## 構文

```cpp theme={null}
HRESULT WdTerminateRemoteGame(  
         _In_z_ const char* remoteDevice  
);  
```

### パラメーター

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

リモート デバイスのホスト名または IP アドレス (例: `"192.168.1.100"` または `"MyDevKit"`)。

### 戻り値

Type: **HRESULT**

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

#### エラー コード

| コード | 値 | 説明 | 根本原因 | トラブルシューティング |
| - | - | - | - | - |
| E\_GAMENOTRUNNING | 0x8C11400C | 実行中のゲーム プロセスがありません。 | 中断または終了できるゲーム プロセスが現在実行されていません | 現在実行中のプロセスを確認してください。ゲーム プロセスに依存する API を実行する前にゲームを起動してください |
| E\_CONNECTIONERROR | 0x8C114014 | 接続エラー。 | IP アドレスの有効性やリモート マシン名の解決とは無関係の、ネットワーク接続の確立時の一般的な失敗 (トランスポート レベルの失敗) | ネットワーク接続、ファイアウォールの規則、リモート マシン上のサービスの可用性を確認してください。デバイス間の可視性を確認してください。デバイスは互いに ping できる必要があります。ログを有効にして接続を再試行してください。 |

## 解説

この関数は、[WdLaunchRemoteGame](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdlaunchremotegame.md) を使用して最後に起動されたゲームを終了するために使用します。関数はゲーム プロセスが終了するまで待機します。

## 要件

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

## 関連項目

* [WdLaunchRemoteGame](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdlaunchremotegame.md)
* [WdResumeRemoteGame](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdresumeremotegame.md)
* [XBOX PC Remote Iteration API エラー コード](https://docs.xbox.com/ja-jp/reference/remoting/error-codes.md)
* [XBOX PC Remote Iteration API](https://docs.xbox.com/ja-jp/reference/remoting/remoteiteration_members.md)


## Related topics

- [WdResumeRemoteGame](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdresumeremotegame.md)
- [WdLaunchRemoteGame](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdlaunchremotegame.md)
- [XBOX PC Remote Iteration API](https://docs.xbox.com/ja-jp/reference/remoting/remoteiteration_members.md)
- [XBOX PC Remote (wdRemote.exe)](https://docs.xbox.com/ja-jp/tools/tools-pc/commandlinetools/gr-wdRemote.md)
- [WdRegisterRemoteXboxGame](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdregisterremotexboxgame.md)
