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

# WdResumeRemoteGame

> WdResumeRemoteGame

# WdResumeRemoteGame

恢复远程设备上最近一次通过 [WdLaunchRemoteGame](/reference/remoting/functions/wdlaunchremotegame) 以挂起模式启动的游戏。

## 语法

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

### 参数

`_In_z_ remoteDevice`\
类型：**const char\***

要在其上恢复游戏的远程设备的主机名或 IP 地址（例如 `"192.168.1.100"` 或 `"MyDevKit"`）。

### 返回值

类型：**HRESULT**

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

#### 错误代码

| 代码                  | 值          | 说明          | 根本原因                                       | 故障排除                                                             |
| ------------------- | ---------- | ----------- | ------------------------------------------ | ---------------------------------------------------------------- |
| E\_GAMENOTSUSPENDED | 0x8C11400B | 指定的进程无法恢复。  | 尝试恢复未处于挂起状态或其挂起上下文不再有效的进程。                 | 恢复前验证进程状态；确保没有其他工具已经恢复或终止了该进程                                    |
| E\_GAMENOTRUNNING   | 0x8C11400C | 没有游戏进程正在运行。 | 当前没有游戏进程正在执行，因而无法进行挂起或终止                   | 验证当前正在运行的进程；在使用依赖于游戏进程的 API 之前启动游戏                               |
| E\_CONNECTIONERROR  | 0x8C114014 | 连接错误。       | 建立网络连接时的通用故障（传输层故障），与 IP 地址有效性或远程计算机名称解析无关 | 检查远程计算机上的网络连接、防火墙规则和服务可用性；检查设备之间的可见性，两者应能够互相 ping 通；启用日志记录后重试连接。 |

## 备注

使用此函数可恢复最近一次通过 [WdLaunchRemoteGame](/reference/remoting/functions/wdlaunchremotegame) 以 [WdLaunchMode::Suspended](/reference/remoting/enums/wdlaunchmode) 方式启动的游戏。这通常在将调试器附加到挂起进程之后进行。

## 要求

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

## 另请参阅

* [WdLaunchRemoteGame](/reference/remoting/functions/wdlaunchremotegame)
* [WdTerminateRemoteGame](/reference/remoting/functions/wdterminateremotegame)
* [WdLaunchMode](/reference/remoting/enums/wdlaunchmode)
* [XBOX PC 远程迭代 API 错误代码](/reference/remoting/error-codes)
* [XBOX PC 远程迭代 API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdTerminateRemoteGame](/zh-CN/reference/remoting/functions/wdterminateremotegame.md)
- [WdLaunchRemoteGame](/zh-CN/reference/remoting/functions/wdlaunchremotegame.md)
- [WdLaunchMode](/zh-CN/reference/remoting/enums/wdlaunchmode.md)
- [XBOX PC Remote Iteration API](/zh-CN/reference/remoting/remoteiteration_members.md)
- [XBOX PC Remote (wdRemote.exe)](/zh-CN/tools/tools-pc/commandlinetools/gr-wdRemote.md)
