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

# XGameUiShowWebAuthenticationResultSize

> XGameUiShowWebAuthenticationResultSize

# XGameUiShowWebAuthenticationResultSize

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

## 语法

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

### 参数

*async*   \_Inout\_\
类型：[XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

指向传递给 [XGameUiShowWebAuthenticationAsync](/reference/system/xgameui/functions/xgameuishowwebauthenticationasync) 的 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) 的指针。

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

从 [XGameUiShowWebAuthenticationAsync](/reference/system/xgameui/functions/xgameuishowwebauthenticationasync) 调用返回的 [XGameUiWebAuthenticationResultData](/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata) 的大小（以字节为单位）。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

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

有关如何使用此方法的示例，请参阅 [XGameUiShowWebAuthenticationAsync](/reference/system/xgameui/functions/xgameuishowwebauthenticationasync) 中的代码示例。

## 要求

**标头：** XGameUI.h

**库：** xgameruntime.lib

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

## 请参阅

[XGameUI](/reference/system/xgameui/xgameui_members)\
[XGameUiShowWebAuthenticationAsync](/reference/system/xgameui/functions/xgameuishowwebauthenticationasync)\
[XGameUiShowWebAuthenticationResult](/reference/system/xgameui/functions/xgameuishowwebauthenticationresult)\
[XGameUiWebAuthenticationResultData](/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata)\
[异步编程模型](/build/core-features/common/async/async-programming-model)


## Related topics

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