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

# XGameSaveEnumerateContainerInfo

> XGameSaveEnumerateContainerInfo

# XGameSaveEnumerateContainerInfo

Retrieves the container info for an **XGameSaveProvider**.

## Syntax

```cpp theme={null}
HRESULT XGameSaveEnumerateContainerInfo(  
         XGameSaveProviderHandle provider,  
         void* context,  
         XGameSaveContainerInfoCallback* callback  
)  
```

### Parameters

*provider*   \_In\_\
Type: XGameSaveProviderHandle

Handle to the **XGameSaveProvider** containing the [XGameSaveContainerInfo](/reference/system/xgamesave/structs/xgamesavecontainerinfo).

*context*   \_In\_opt\_\
Type: void\*

Pointer that will be passed into the callback function.

*callback*   \_In\_\
Type: XGameSaveContainerInfoCallback\*

The callback function to run for every container, return false to stop the enumeration. Use this function to collect the XGameSaveContainerInfo.

### Return value

Type: HRESULT

Function Result

## Remarks

Use this function to inspect what containers are available for a user. This may include data that is needed to show in UX. Enumerating this set will not cause a sync for a SyncOnDemand provider and will allow the caller to actually inspect the sync status via the needsSync field of [XGameSaveContainerInfo](/reference/system/xgamesave/structs/xgamesavecontainerinfo). Any read of blob data or usage of an update context on a container that has *needsSync* set to true will force a sync and could potentially return various sync errors.
You can use the [XGameSaveEnumerateContainerInfoByName](/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfo) to perform a filter for containers by specifying a prefix that must be matched before a container's information is returned.

## Requirements

**Header:** XGameSave.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XGameSave](/reference/system/xgamesave/xgamesave_members)\
[XGameSaveEnumerateContainerInfoByName](/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfo)\
[XGameSaveContainerInfo](/reference/system/xgamesave/structs/xgamesavecontainerinfo)\
[Debugging Game Saves](/build/core-features/common/game-save/game-saves-debugging)


## Related topics

- [XGameSaveEnumerateContainerInfoByName](/reference/system/xgamesave/functions/xgamesaveenumeratecontainerinfobyname.md)
- [XGameSaveContainerInfoCallback](/reference/system/xgamesave/functions/xgamesavecontainerinfocallback.md)
- [XGameSaveContainerInfo](/reference/system/xgamesave/structs/xgamesavecontainerinfo.md)
- [XGameSaveGetContainerInfo](/reference/system/xgamesave/functions/xgamesavegetcontainerinfo.md)
- [XGameSave API overview](/build/core-features/common/game-save/xgamesave.md)
