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

# XGameUiShowWebAuthenticationResultSize

获取存储先前已完成身份验证请求所需的缓冲区大小。此大小是可变的，因为服务器响应可能包含任意数量的数据。

## 语法

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

### 参数

*async*   \_Inout\_\
类型：[XAsyncBlock\*](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md)

指向传递给 [XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md) 的 [XAsyncBlock](https://docs.xbox.com/zh-CN/reference/system/xasync/structs/xasyncblock.md) 的指针。

*bufferSize*   \_Out\_\
类型：size\_t\*

从 [XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md) 调用返回的 [XGameUiWebAuthenticationResultData](https://docs.xbox.com/zh-CN/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata.md) 的大小（以字节为单位）。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

在 *AsyncBlock* 回调中或 *AsyncBlock* 完成后调用此方法。你必须调用此方法，以便分配足够大小的缓冲区来容纳 [XGameUiShowWebAuthenticationResult](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md) 返回的结果数据。

有关如何使用此方法的示例，请参阅 [XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md) 中的代码示例。

## 要求

**标头：** XGameUI.h

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 请参阅

[XGameUI](https://docs.xbox.com/zh-CN/reference/system/xgameui/xgameui_members.md)\
[XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md)\
[XGameUiShowWebAuthenticationResult](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md)\
[XGameUiWebAuthenticationResultData](https://docs.xbox.com/zh-CN/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata.md)\
[异步编程模型](https://docs.xbox.com/zh-CN/build/core-features/common/async/async-programming-model.md)


## Related topics

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