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

# XtfStartTitleOSByGameConfig

> XtfStartTitleOSByGameConfig

# XtfStartTitleOSByGameConfig

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

<a id="syntaxSection" />

## 语法

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

<a id="parametersSection" />

### 参数

*address*\
类型：PCWSTR

\[in] 主机的 IP 地址。

*flags*\
类型：UINT32

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

*gameconfigContents*\
类型：PCWSTR

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

<a id="retvalSection" />

### 返回值

类型：HRESULT

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

<a id="remarksSection" />

## 备注

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

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

<a id="requirements" />

## 要求

**头文件：** xtfapi.h

**库：** XtfApi.lib

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

<a id="seealsoSection" />

## 另请参阅

[XTF 传输错误 (NDA 主题)](/tools/tools-console/commandlinetools/xtf-transport-errors)\
[其他 Xtf API](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfStartTitleOS](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfstarttitleos-xtfapi-xbox-windows-m.md)
- [XtfStartTitleOSByVersion](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfstarttitleosbyversion-xtfapi-xbox-windows-m.md)
- [XtfCacheTitleOS](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfcachetitleos-xtfapi-xbox-windows-m.md)
- [XtfRemoveTitleOSFromCache](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcache-xtfapi-xbox-windows-m.md)
- [XtfGetCachedTitleOSVersionsCallback](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfgetcachedtitleosversionscallback-xtfapi-xbox-windows-m.md)
