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

# XGameUiShowWebAuthenticationResultSize

> XGameUiShowWebAuthenticationResultSize

Retrieves the size of the buffer needed to store a previously completed authentication request. This size is variable because the server response can contain an arbitrary amount of data.

## Syntax

```cpp theme={null}
HRESULT XGameUiShowWebAuthenticationResultSize(  
         XAsyncBlock* async,  
         size_t* bufferSize  
)  
```

### Parameters

*async*   \_Inout\_\
Type: [XAsyncBlock\*](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md)

A pointer to the [XAsyncBlock](https://docs.xbox.com/reference/system/xasync/structs/xasyncblock.md) that was passed to [XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md).

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

The size, in bytes, of the [XGameUiWebAuthenticationResultData](https://docs.xbox.com/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata.md) returned from the [XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md) call.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

Call this method inside the *AsyncBlock* callback or after the *AsyncBlock* is complete. You must call this method so that you can allocate a buffer of sufficient size to contain the result data returned in [XGameUiShowWebAuthenticationResult](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md).

For an example of how to use this method, see the code example in [XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md).

## Requirements

**Header:** XGameUI.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XGameUI](https://docs.xbox.com/reference/system/xgameui/xgameui_members.md)\
[XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md)\
[XGameUiShowWebAuthenticationResult](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md)\
[XGameUiWebAuthenticationResultData](https://docs.xbox.com/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata.md)\
[Asynchronous Programming Model](https://docs.xbox.com/build/core-features/common/async/async-programming-model.md)


## Related topics

- [XGameUiShowWebAuthenticationResult](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md)
- [XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md)
- [XGameUiShowWebAuthenticationWithOptionsAsync](https://docs.xbox.com/reference/system/xgameui/functions/xgameuishowwebauthenticationwithoptionsasync.md)
- [XGameUiWebAuthenticationResultData](https://docs.xbox.com/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata.md)
- [XGameUiWebAuthenticationOptions](https://docs.xbox.com/reference/system/xgameui/enums/xgameuiwebauthenticationoptions.md)
