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

# XtfCacheTitleOS

> XtfCacheTitleOS

Adds a Game OS to the OS cache.

## Syntax

```cpp theme={null}
HRESULT XtfCacheTitleOS(
         PCWSTR address,
         PCWSTR osIdentifier
)  
```

### Parameters

*address*\
Type: PCWSTR

\[in] The address of the console.

*osIdentifier*\
Type: PCWSTR

\[in] The identifier of the Game OS to be added. This identifier can be one of the following:

* The full path and file name of a MicrosoftGame.config file that contains the four-part version number of the Game OS version to be added
* The full path and file name of a GameOs.xvd file
* The full path to a directory that contains a MicrosoftGame.config or GameOS.vxd file
* The four-part version number of the Game OS to be added

Examples of valid identifiers:

* D:\MyGame
* \MyDevPC\share\MyGame\MicrosoftGame.config
* xd:\Titles\MyGamePFN\GameOs.xvd
* 10.0.18236.1002

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an HRESULT error code.

## Remarks

Use this function to manage provisioned Game OS files by adding the specified Game OS to the cache on the console. You can use the [XtfGetCachedTitleOSVersions](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetcachedtitleosversions-xtfapi-xbox-windows-m.md) function to get the version information of each Game OS cached on the console. You can also remove an existing Game OS from the cache by calling the [XtfRemoveTitleOSFromCache](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcache-xtfapi-xbox-windows-m.md) or [XtfRemoveTitleOSFromCacheByVersion](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcachebyversion-xtfapi-xbox-windows-m.md) functions. For more information about managing provisioned Game OS files, see [Application Management (xbapp.exe) (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xbapp.md) and [Provision (xbprovision.exe) (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xbprovision.md).

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

**Supported platforms:** Windows (for XBOX console tools)

## See also

[Run from PC Deployment (NDA topic)](https://docs.xbox.com/home/setup-install/concepts/deployment.md)\
[XTF Transport Errors (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xtf-transport-errors.md)\
[Additional Xtf APIs](https://docs.xbox.com/reference/tools/xtf/xtfapi/atoc-xtfapi.md)


## Related topics

- [XtfRemoveTitleOSFromCache](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcache-xtfapi-xbox-windows-m.md)
- [XtfRemoveTitleOSFromCacheByVersion](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfremovetitleosfromcachebyversion-xtfapi-xbox-windows-m.md)
- [XtfGetCachedTitleOSVersions](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetcachedtitleosversions-xtfapi-xbox-windows-m.md)
- [XtfStartTitleOS](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfstarttitleos-xtfapi-xbox-windows-m.md)
- [Additional Xtf APIs (API contents)](https://docs.xbox.com/reference/tools/xtf/xtfapi/atoc-xtfapi.md)
