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

# XtfStartTitleOSByGameConfig

> XtfStartTitleOSByGameConfig

# XtfStartTitleOSByGameConfig

根据以字符串形式存储在内存中的 MicrosoftGame.config 文件的内容启动或重新启动 Game OS。

## 语法

```cpp theme={null}
HRESULT XtfStartTitleOSByGameConfig(
         PCWSTR address,
         UINT32 flags,
         PCWSTR gameconfigContents
)  
```

### 参数

*address*\
类型：PCWSTR

\[in] 主机的 IP 地址。

*flags*\
类型：UINT32

\[in] 当前未使用，但保留用于未来的行为变更。

*gameconfigContents*\
类型：PCWSTR

\[in] MicrosoftGame.config 文件的内容。

### 返回值

类型：HRESULT

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

## 备注

使用此函数根据以字符串形式存储在内存中的 MicrosoftGame.config 文件的内容启动或重新启动 Game OS。如果未指定 `address` 或 `gameconfigContents` 的值，将发生错误。

有关 MicrosoftGame.config 文件内容的详细信息，请参阅 [MicrosoftGame.config 概述](https://docs.xbox.com/zh-CN/build/core-features/common/game-config/MicrosoftGameConfig-Overview.md)。

## 要求

**头文件：** xtfapi.h

**库：** XtfApi.lib

**支持的平台：** Windows（用于 XBOX 主机工具）

## 另请参阅

[XTF 传输错误 (NDA 主题)](https://docs.xbox.com/zh-CN/tools/tools-console/commandlinetools/xtf-transport-errors.md)\
[其他 Xtf API](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapi/atoc-xtfapi.md)


## Related topics

- [XtfStartTitleOS](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapi/functions/xtfstarttitleos-xtfapi-xbox-windows-m.md)
- [XtfStartTitleOSByVersion](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapi/functions/xtfstarttitleosbyversion-xtfapi-xbox-windows-m.md)
- [其他 Xtf API（API 内容）](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapi/atoc-xtfapi.md)
- [XtfCacheTitleOS](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfapi/functions/xtfcachetitleos-xtfapi-xbox-windows-m.md)
- [Start](https://docs.xbox.com/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
