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

# XGameSaveGetRemainingQuotaAsync

> XGameSaveGetRemainingQuotaAsync

# XGameSaveGetRemainingQuotaAsync

Returns the amount of data available to store using the XGameSave api asynchronously.

## Syntax

```cpp theme={null}
HRESULT XGameSaveGetRemainingQuotaAsync(  
         XGameSaveProviderHandle provider,  
         XAsyncBlock* async  
)  
```

### Parameters

*provider*   \_In\_\
Type: XGameSaveProviderHandle

Handle to the XGameSaveProvider to query remaining data for.

*async*   \_In\_\
Type: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

AsyncBlock containing the calling context and the callback function.

### Return value

Type: HRESULT

Function result.

## Remarks

Result and remaining quota are retrieved from the [XGameSaveGetRemainingQuotaResult](/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult) function.

Each application has a quota on how much data they can save for a user, if this is exceeded any attempts to save more data may fail with **E\_GS\_QUOTA\_EXCEEDED**. As this is not a fixed size we have exposed access to the remaining quota so the application can try to avoid **E\_GS\_QUOTA\_EXCEEDED** failures. To give an accurate view we always make sure that any outstanding writes, updates or deletes are handled first before returning since any of these can change the remaining quota.

## Requirements

**Header:** XGameSave.h

**Library:** xgameruntime.lib

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

## Conceptual documentation

* [Asynchronous Programming Model](/build/core-features/common/async/async-programming-model)

## See also

[XGameSave](/reference/system/xgamesave/xgamesave_members)\
[XGameSaveGetRemainingQuotaResult](/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult)\
[Debugging Game Saves](/build/core-features/common/game-save/game-saves-debugging)


## Related topics

- [XGameSaveGetRemainingQuotaResult](/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult.md)
- [Asynchronous Programming Model](/build/core-features/common/async/async-programming-model.md)
- [XAsyncGetResultSize](/reference/system/xasync/functions/xasyncgetresultsize.md)
- [XGameSave](/reference/system/xgamesave/xgamesave_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
