Skip to main content
Steam enables cloud storage in one of two ways. You can make all your reads and writes by using the ISteamRemoteStorage API methods, which write files to the game’s storage folder on the local hard drive and sync them to the cloud. Alternatively, you can make all your reads and writes directly to the computer’s file system, and then use Steam Auto-Cloud to sync the local folder containing the game data to the cloud. The Microsoft Game Development Kit (GDK) supports both approaches:
No-code cloud saves aren’t supported on XBOX consoles or XBOX Cloud Gaming. If your title targets console or cloud in addition to Windows PC, use the XGameSave wrapper or the full XGameSave API instead.
The code-based wrapper is the recommended path for titles that ship on console or cloud. It maps closely to writing files locally or by using the Steam Remote Storage API. This topic focuses on the simplified wrapper.
The full, nonwrapped XGameSave API offers more functionality and flexibility than the simple wrapper. If you need any of that functionality, don’t use the wrapper. Games must not switch between the two or mix API calls from both. For more information about the XGameSave API, see Game saves.
The following code examples show how basic file operations work in the Steamworks SDK and the Microsoft Game Development Kit (GDK), along with some subtle differences between the two APIs.

File operation comparisons

The following code examples show how to accomplish basic file operations in the Steamworks Remote Storage API and the GDK equivalent. They assume that the provider variable holds a pointer to an initialized Microsoft::Xbox::Wrappers::GameSave::Provider object. If you aren’t using the Steam Remote Storage API but instead opted to use Steam Auto-Cloud, replace the Remote Storage API calls with their file system API equivalents.

Reading a file

Steamworks

or

GDK

Reference documentation

Microsoft.Xbox.Wrappers.XGameSave.Provider.Load

Writing a file

Steamworks

or

GDK

Reference documentation

Microsoft.Xbox.Wrappers.XGameSave.Provider.Save

Delete a file

On Steam, you can either delete a file in the cloud but keep the local copy (FileForget), or delete a file from both locations (FileDelete). The XGameSave wrapper API doesn’t have an equivalent to FileForget. Its Delete function works like FileDelete in Steamworks.

Steamworks

or

GDK

or
or

Reference documentation

Get all files

Steamworks

GDK

Reference documentation

Check available space

In the following examples, totalBytes is the amount of space your game is given on the cloud storage provider. availableBytes is the amount of free space remaining (that is, availableBytes = totalBytesbytesUsed).

Steamworks

GDK

Reference documentation

Microsoft.Xbox.Wrappers.XGameSave.Provider.GetQuota

Terminology differences

On Steam, remote storage data is managed as files, which work like files on a local hard drive. To read or write, you specify the file and then get or set the bytes that it contains. In the Microsoft Game Development Kit (GDK), the equivalent of Steam files are blobs. Blobs are grouped together in a structure called a container. A container is a named group of blobs. For example, you can use containers to support multiple save slots per user, with the same file names in each slot. If you don’t need the extra organizational layer that containers provide, place all your blobs (files) in the same container.
Container names can’t include spaces. Attempting to access or create a container name that includes a space causes the provider method to return an HRESULT of 0x80830001: the specified volume doesn’t support storage tiers.

Storage limits

The Microsoft Game Development Kit (GDK) has a lower maximum blob or file write size and overall storage limit than Steam. On Steam, each file write operation is limited to 100 mebibytes (MiB), and each file can’t be larger than 200 MiB. In contrast, the XGameSave API and its wrapper limit each blob to 16 MB and allow a maximum of 256 MB per user per game. If you need to store more than 16 MB of data in a blob, split the data into multiple blobs. Then implement a sequential read and write function to process the data one blob at a time.

Wrapper functions are blocking

The ISteamRemoteStorage interface offers two versions of read and write functions: FileRead and FileWrite, plus FileReadAsync and FileWriteAsync. The Async versions call back when the file has been read or written. The simplified XGameSave wrapper functions don’t offer asynchronous versions of its equivalents to FileRead and FileWrite. Provider::Load and Provider::Save are both blocking, so keep this behavior in mind when you use them in your game. For this reason, Provider::Initialize throws an exception if you call it from the UI thread.

Initialization

Include the header file for the wrapper in your game’s solution before you use any wrapper methods. You can find it at %GRDKLatest%\GameKit\Include\xgamesavewrappers.hpp. Before using the XGameSave wrapper’s methods, create an instance of the Provider class and call the Provider::Initialize method. Hold a pointer to the Provider instance for the lifetime of your game. Call Provider::Initialize from a thread other than the UI thread. The method throws an exception if you call it from the UI thread. To initialize the wrapper provider, you need an XUserHandle for the current user and your game’s service configuration identifier (SCID).

Reference documentation

Microsoft.Xbox.Wrappers.XGameSave.Provider.Initialize
Last modified on August 20, 2026