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

# XtfGetTitleOSFourPartVersion

> XtfGetTitleOSFourPartVersion

# XtfGetTitleOSFourPartVersion

获取当前正在运行的标题的 Game OS 的版本信息。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT XtfGetTitleOSFourPartVersion(
         PCWSTR address,
         UINT32* flags,
         FourPartVersion* version
)
```

<a id="parametersSection" />

### 参数

*address*<br />类型：PCWSTR

\[in] 主机的地址。

*flags*<br />类型：UINT32\*

\[out] 一个按位或组合的标志，提供有关 Game OS 的附加信息。此参数支持以下标志：

| 标志                                   | 值      | 说明                           |
| ------------------------------------ | ------ | ---------------------------- |
| XTF\_CACHED\_TITLE\_OS\_IS\_FALLBACK | 0x0001 | 表示此 Game OS 是回退 OS，不能被删除或替换。 |

*version*<br />类型：[FourPartVersion](/reference/tools/xtf/xtfapi/structs/fourpartversion-xtfapi-xbox-windows-s)\*

\[out] Game OS 的四部分版本号。

<a id="retvalSection" />

### 返回值

类型：HRESULT

成功时返回 `S_OK`；否则返回一个 HRESULT 错误代码。

<a id="remarksSection" />

## 备注

使用此函数返回当前正在运行的标题的 Game OS 的版本信息。如果当前没有正在运行的 Game OS，将发生错误。你还可以使用 [XtfGetCachedTitleOSVersions](/reference/tools/xtf/xtfapi/functions/xtfgetcachedtitleosversions-xtfapi-xbox-windows-m) 函数来返回主机上缓存的其他 Game OS 版本的版本信息。有关管理已配置的 Game OS 文件的更多信息，请参阅 [应用程序管理 (xbapp.exe) (NDA 主题)](/tools/tools-console/commandlinetools/xbapp) 和 [Provision (xbprovision.exe) (NDA 主题)](/tools/tools-console/commandlinetools/xbprovision)。

<a id="requirementsSection" />

## 要求

**头文件：** xtfapi.h

**库：** XtfApi.lib

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

<a id="seealsoSection" />

## 另请参阅

[Run from PC Deployment (NDA 主题)](/home/setup-install/concepts/deployment)<br />[XtfGetPackageFullName](/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m)<br />[XtfGetAumid](/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m)<br />[XTF 传输错误 (NDA 主题)](/tools/tools-console/commandlinetools/xtf-transport-errors)<br />[其他 Xtf API](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [FourPartVersion](/zh-CN/reference/tools/xtf/xtfapi/structs/fourpartversion-xtfapi-xbox-windows-s.md)
- [XtfStartTitleOSByVersion](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfstarttitleosbyversion-xtfapi-xbox-windows-m.md)
- [XtfRemoveTitleOSFromCacheByVersion](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcachebyversion-xtfapi-xbox-windows-m.md)
- [XtfStartTitleOS](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfstarttitleos-xtfapi-xbox-windows-m.md)
- [XtfRemoveTitleOSFromCache](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcache-xtfapi-xbox-windows-m.md)
