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

# XAsyncGetResultSize

> XAsyncGetResultSize

# XAsyncGetResultSize

[XAsyncGetResult](https://docs.xbox.com/ja-jp/reference/system/xasyncprovider/functions/xasyncgetresult.md) に渡すバッファーに必要なサイズを返します。

## Syntax

```cpp theme={null}
HRESULT XAsyncGetResultSize(  
         XAsyncBlock* asyncBlock,  
         size_t* bufferSize  
)  
```

### Parameters

*asyncBlock*   \_Inout\_\
型: [XAsyncBlock\*](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md)

非同期呼び出しに渡された [XAsyncBlock](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md) へのポインター。

*bufferSize*   \_Out\_\
型: size\_t\*

結果を保持するために必要なバッファーのサイズ (バイト単位)。

### Return value

型: [HRESULT](https://learn.microsoft.com/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

成功した場合は `S_OK` を返します。それ以外の場合はエラー コードを返します。エラー コードの一覧については、[Error Codes](https://docs.xbox.com/ja-jp/reference/errorcodes.md) を参照してください。

## Remarks

非同期呼び出しが結果を返す場合は、[XAsyncGetResult](https://docs.xbox.com/ja-jp/reference/system/xasyncprovider/functions/xasyncgetresult.md) を呼び出す前にこの関数を呼び出して、結果を保持するのに必要なバッファーのサイズを指定します。結果を返す各非同期呼び出しには、その非同期呼び出しから結果を返すために呼び出せる対応する関数が必要です。

結果を返す対応する関数を持つ非同期呼び出しの例については、[XGameSaveGetRemainingQuotaAsync](https://docs.xbox.com/ja-jp/reference/system/xgamesave/functions/xgamesavegetremainingquotaasync.md) および [XGameSaveGetRemainingQuotaResult](https://docs.xbox.com/ja-jp/reference/system/xgamesave/functions/xgamesavegetremainingquotaresult.md) を参照してください。

## Requirements

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

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

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

## Conceptual documentation

* [Asynchronous Programming Model](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-programming-model.md)
* [Debugging Game Saves](https://docs.xbox.com/ja-jp/build/core-features/common/game-save/game-saves-debugging.md)

## See also

[XAsync Members](https://docs.xbox.com/ja-jp/reference/system/xasync/xasync_members.md)\
[XAsyncGetStatus](https://docs.xbox.com/ja-jp/reference/system/xasync/functions/xasyncgetstatus.md)\
[Asynchronous Programming Model](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-programming-model.md)


## Related topics

- [Game Saves のデバッグ](https://docs.xbox.com/ja-jp/build/core-features/common/game-save/game-saves-debugging.md)
- [非同期プログラミング モデル](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-programming-model.md)
- [XAsync (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xasync/xasync_members.md)
- [XAsyncCancel](https://docs.xbox.com/ja-jp/reference/system/xasync/functions/xasynccancel.md)
- [XAsyncBlock](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md)
