XGameSaveEnumerateContainerInfo

Retrieves the container info for an XGameSaveProvider.

Syntax

HRESULT XGameSaveEnumerateContainerInfo(  
         XGameSaveProviderHandle provider,  
         void* context,  
         XGameSaveContainerInfoCallback* callback  
)  

Parameters

provider   _In_
Type: XGameSaveProviderHandle

Handle to the XGameSaveProvider containing the 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. 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 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

See also

XGameSave
XGameSaveEnumerateContainerInfoByName
XGameSaveContainerInfo
Game save errors