> ## 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] 旗標的位元 OR 組合，提供有關 Game OS 的其他資訊。此參數支援下列旗標：

| 旗標 | 值 | 描述 |
| - | - | - |
| XTF\_CACHED\_TITLE\_OS\_IS\_FALLBACK | 0x0001 | 表示此 Game OS 是後援 OS，無法刪除或取代。 |

*version*<br />類型：[FourPartVersion](/zh-TW/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](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcachedtitleosversions-xtfapi-xbox-windows-m) 函式傳回快取在主機上之其他 Game OS 版本的版本資訊。如需管理已佈建 Game OS 檔案的詳細資訊，請參閱[應用程式管理 (xbapp.exe) (NDA 主題)](/zh-TW/tools/tools-console/commandlinetools/xbapp) 和[佈建 (xbprovision.exe) (NDA 主題)](/zh-TW/tools/tools-console/commandlinetools/xbprovision)。

<a id="requirementsSection" />

## 需求

**標頭：** xtfapi.h

**程式庫：** XtfApi.lib

**支援的平台：** Windows (適用於 XBOX 主機工具)

<a id="seealsoSection" />

## 另請參閱

[從 PC 執行部署 (NDA 主題)](/zh-TW/home/setup-install/concepts/deployment)<br />[XtfGetPackageFullName](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m)<br />[XtfGetAumid](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m)<br />[XTF 傳輸錯誤 (NDA 主題)](/zh-TW/tools/tools-console/commandlinetools/xtf-transport-errors)<br />[其他 Xtf API](/zh-TW/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

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