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

# XtfGetCachedTitleOSVersions

> XtfGetCachedTitleOSVersions

# XtfGetCachedTitleOSVersions

获取主机上缓存的每个 Game OS 的版本信息。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT XtfGetCachedTitleOSVersions(
         PCWSTR address,
         XtfGetCachedTitleOSVersionsCallback clientCallback,
         PVOID context
)  
```

<a id="parametersSection" />

### 参数

*address*<br />类型：PCWSTR

\[in] 主机的地址。

*clientCallback*<br />类型：[XtfGetCachedTitleOSVersionsCallback](/reference/tools/xtf/xtfapi/functions/xtfgetcachedtitleosversionscallback-xtfapi-xbox-windows-m)

\[in] 针对主机缓存中每个 Game OS 调用的回调。

*context*<br />类型：PVOID

\[in, optional] 指向要传入回调的上下文对象的指针。

<a id="retvalSection" />

### 返回值

类型：HRESULT

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

<a id="remarksSection" />

## 备注

将此函数与 [XtfGetCachedTitleOSVersionsCallback](/reference/tools/xtf/xtfapi/functions/xtfgetcachedtitleosversionscallback-xtfapi-xbox-windows-m) 函数一起使用，以获取主机上缓存的每个 Game OS 的版本信息。对于缓存中的每个 Game OS，回调函数会提供包含四部分版本号的 [FourPartVersion](/reference/tools/xtf/xtfapi/structs/fourpartversion-xtfapi-xbox-windows-s) 以及有关该 Game OS 的其他信息。

你可以通过调用 [XtfCacheTitleOS](/reference/tools/xtf/xtfapi/functions/xtfcachetitleos-xtfapi-xbox-windows-m) 函数向主机缓存中添加 Game OS，或通过调用 [XtfRemoveTitleOSFromCache](/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcache-xtfapi-xbox-windows-m) 或 [XtfRemoveTitleOSFromCacheByVersion](/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcachebyversion-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 />[XTF 传输错误 (NDA 主题)](/tools/tools-console/commandlinetools/xtf-transport-errors)<br />[其他 Xtf API](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfGetCachedTitleOSVersionsCallback](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfgetcachedtitleosversionscallback-xtfapi-xbox-windows-m.md)
- [XtfGetTitleOSFourPartVersion](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfgettitleosfourpartversion-xtfapi-xbox-windows-m.md)
- [XtfCacheTitleOS](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfcachetitleos-xtfapi-xbox-windows-m.md)
- [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)
