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

# Get quota info for a Title Storage service configuration

> Flat C code sample for retrieving XBOX Title Storage quota and used bytes for a service configuration and storage type via XblTitleStorageGetQuotaAsync.

This topic demonstrates how to get quota information for a specified service configuration and storage type in XBOX Title Storage by using the following flat C code example.

<Note>For `TrustedPlatform ` storage types, the request is made for the calling player's XBOX user ID.</Note>

#### Flat C

```cpp theme={null}
auto asyncBlock = std::make_unique<XAsyncBlock>();
asyncBlock->queue = queue;
asyncBlock->context = nullptr;
asyncBlock->callback = [](XAsyncBlock* asyncBlock)
{
    std::unique_ptr<XAsyncBlock> asyncBlockPtr{ asyncBlock };   // Take over ownership of XAsyncBlock*.
    size_t usedBytes;
    size_t quotaBytes;
    HRESULT hr = XblTitleStorageGetQuotaResult(asyncBlock, &usedBytes, &quotaBytes);
};

HRESULT hr = XblTitleStorageGetQuotaAsync(
    xboxLiveContext,
    scid,
    storageType,
    asyncBlock.get()
);

if (SUCCEEDED(hr))
{
    // The call succeeded, so release  std::unique_ptr ownership of XAsyncBlock* because
    // the callback takes over ownership. If the call fails, however, std::unique_ptr keeps
    // ownership and deletes XAsyncBlock*.
    asyncBlock.release();
}
```

## See also

[XAsyncBlock](/reference/system/xasync/structs/xasyncblock)

[XblTitleStorageGetQuotaAsync](/reference/live/xsapi-c/title_storage_c/functions/xbltitlestoragegetquotaasync)

[XblTitleStorageGetQuotaResult](/reference/live/xsapi-c/title_storage_c/functions/xbltitlestoragegetquotaresult)
