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

# XGameSaveGetRemainingQuota

> XGameSaveGetRemainingQuota

# XGameSaveGetRemainingQuota

**XGameSave** API を使って格納できるデータ量を返します。

## Syntax

```cpp theme={null}
HRESULT XGameSaveGetRemainingQuota(  
         XGameSaveProviderHandle provider,  
         int64_t* remainingQuota  
)  
```

### Parameters

*provider*   \_In\_\
型: XGameSaveProviderHandle

残りのデータ量を問い合わせる **XGameSaveProvider** のハンドル。

*remainingQuota*   \_Out\_\
型: int64\_t\*

ストレージとして使用できるデータ量。

### Return value

型: HRESULT

関数の結果。

## Remarks

> [!NOTE]
>
> この関数は、時間依存スレッドから呼び出しても安全ではありません。詳細については、[Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads) を参照してください。

各アプリケーションには、ユーザーに対して保存できるデータ量にクォータがあります。これを超えると、それ以上データを保存しようとする試みは **E\_GS\_QUOTA\_EXCEEDED** で失敗する場合があります。これは固定サイズではないため、アプリケーションが **E\_GS\_QUOTA\_EXCEEDED** 失敗を回避しようとできるように、残りのクォータへのアクセスを公開しています。正確なビューを提供するために、これらのいずれもが残りのクォータを変更する可能性があるため、返す前に未処理の書き込み、更新、または削除を必ず先に処理します。[XGameSaveSubmitUpdate](https://docs.xbox.com/ja-jp/reference/system/xgamesave/functions/xgamesavesubmitupdate.md) 呼び出しを実行するのに合理的な量のデータが残っているかどうかを確認するため、この関数を呼び出すことをお勧めします。

```cpp theme={null}
void Sample::_GetQuotaSync(uint64_t* remainingQuota) 
{ 
    HRESULT hr = XGameSaveGetRemainingQuota(_provider, remainingQuota); 
    if (FAILED(hr)) 
    { 
        printf("Error retrieving Quota hr=0x%08x\n", hr); 
    } 
} 
```

## Requirements

**ヘッダー:** XGameSave.h

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体および XBOX Series 本体

## Conceptual documentation

* [Game Saves storage systems](https://docs.xbox.com/ja-jp/build/core-features/common/game-save/game-saves-storage-systems.md)
* [XGameSave API overview](https://docs.xbox.com/ja-jp/build/core-features/common/game-save/xgamesave.md)
* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

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


## Related topics

- [Game Saves ストレージ システム](https://docs.xbox.com/ja-jp/build/core-features/common/game-save/game-saves-storage-systems.md)
- [XGameSave API の概要](https://docs.xbox.com/ja-jp/build/core-features/common/game-save/xgamesave.md)
- [XGameSave (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xgamesave/xgamesave_members.md)
- [Unity プロジェクトでの GDK API 用 C# ラッパーの使用](https://docs.xbox.com/ja-jp/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XGameSaveGetRemainingQuotaResult](https://docs.xbox.com/ja-jp/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult.md)
