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

# XAsyncGetResultSize

> XAsyncGetResultSize

# XAsyncGetResultSize

[XAsyncGetResult](/reference/system/xasyncprovider/functions/xasyncgetresult) に渡すバッファーに必要なサイズを返します。

## Syntax

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

### Parameters

*asyncBlock*   \_Inout\_\
型: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

非同期呼び出しに渡された [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) へのポインター。

*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](/reference/errorcodes) を参照してください。

## Remarks

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

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

## Requirements

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

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

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

## Conceptual documentation

* [Asynchronous Programming Model](/build/core-features/common/async/async-programming-model)
* [Debugging Game Saves](/build/core-features/common/game-save/game-saves-debugging)

## See also

[XAsync Members](/reference/system/xasync/xasync_members)\
[XAsyncGetStatus](/reference/system/xasync/functions/xasyncgetstatus)\
[Asynchronous Programming Model](/build/core-features/common/async/async-programming-model)


## Related topics

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