Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Releases resources held by the XGameSaveProvider.
Syntax
void XGameSaveCloseProvider(
XGameSaveProviderHandle provider
)
Parameters
provider _In_
Type: XGameSaveProviderHandle
XGameSaveProvider handle to be closed.
Return value
Type: void
Remarks
Note
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.
XGameSaveProviderHandle _provider;
void Sample::_Uninitialize()
{
if (_provider)
{
XGameSaveCloseProvider(_provider);
_provider = nullptr;
}
}
Requirements
Header: XGameSave.h
Library: xgameruntime.lib
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles
See also
XGameSave
XGameSaveInitializeProvider
XGameSaveInitializeProviderAsync
Game save errors