Skip to main content

XGameSaveCloseProvider

Releases resources held by the XGameSaveProvider.

Syntax

Parameters

provider   _In_
Type: XGameSaveProviderHandle
XGameSaveProvider handle to be closed.

Return value

Type: void

Remarks

This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
Each provider holds on to resources that need to be cleaned up when no longer needed or when the existing provider has become invalid. A provider can become invalid for a few reasons with the primary one being that the while the application was suspended the context was stolen on a different device by the same user. This is represented as E_GS_HANDLE_EXPIRED and can be returned from any of the XGameSave APIs, the proper handling is to close the provider and then re-initialize and have the user prompted to deal with any possible conflict issues.

Requirements

Header: XGameSave.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

Conceptual documentation

See also

XGameSave
XGameSaveInitializeProvider
XGameSaveInitializeProviderAsync
Debugging Game Saves
Last modified on August 20, 2026