XAsyncGetResultSize

Returns the required size of the buffer to pass to XAsyncGetResult.

Syntax

HRESULT XAsyncGetResultSize(  
         XAsyncBlock* asyncBlock,  
         size_t* bufferSize  
)  

Parameters

asyncBlock   _Inout_
Type: XAsyncBlock*

A pointer to the XAsyncBlock that was passed to the asynchronous call.

bufferSize   _Out_
Type: size_t*

The required size, in bytes, of the buffer needed to hold the results.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes.

Remarks

If an asynchronous call returns results, call this function prior to calling XAsyncGetResult to specify the size of the buffer required to hold the results. Each asynchronous call that returns results must have a corresponding function that can be called to return the results from that asynchronous call.

For an example of an asynchronous call with a corresponding function to return results, see XGameSaveGetRemainingQuotaAsync and XGameSaveGetRemainingQuotaResult.

Requirements

Header: XAsync.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XAsync Members
XAsyncGetStatus
Asynchronous Programming Model