> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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\*](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md)

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](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult.md) 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](https://docs.xbox.com/build/core-features/common/async/async-programming-model.md)

## See also

[XGameSave](https://docs.xbox.com/reference/system/xgamesave/xgamesave_members.md)\
[XGameSaveGetRemainingQuotaResult](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult.md)\
[Debugging Game Saves](https://docs.xbox.com/build/core-features/common/game-save/game-saves-debugging.md)


## Related topics

- [XGameSaveGetRemainingQuotaResult](https://docs.xbox.com/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult.md)
- [XAsyncGetResultSize](https://docs.xbox.com/reference/system/xasync/functions/xasyncgetresultsize.md)
- [Asynchronous Programming Model](https://docs.xbox.com/build/core-features/common/async/async-programming-model.md)
- [XGameSave (API contents)](https://docs.xbox.com/reference/system/xgamesave/xgamesave_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
