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

# XGameUiShowWebAuthenticationResult

> XGameUiShowWebAuthenticationResult

# XGameUiShowWebAuthenticationResult

获取 [XGameUiShowWebAuthenticationAsync](/reference/system/xgameui/functions/xgameuishowwebauthenticationasync) 调用的结果。

## 语法

```cpp theme={null}
HRESULT XGameUiShowWebAuthenticationResult(  
         XAsyncBlock* async,  
         size_t bufferSize,  
         void* buffer,  
         XGameUiWebAuthenticationResultData** ptrToBuffer,  
         size_t* bufferUsed  
)  
```

### 参数

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

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

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

用于接收已完成身份验证请求的结果数据的缓冲区大小（以字节为单位）。

*buffer*   \_Out\_writes\_bytes\_to\_(bufferSize,*bufferUsed)\
类型：void*

指向用于接收已完成身份验证请求结果数据的缓冲区的指针。此缓冲区保存结果数据结构以及可变大小的响应数据。

*ptrToBuffer*   \_Outptr\_\
类型：[XGameUiWebAuthenticationResultData\*\*](/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata)

指向结果数据结构的引用指针。结果数据结构存储在传入的 *buffer* 中。

*bufferUsed*   \_Out\_opt\_\
类型：size\_t\*

用于存储结果数据和可变响应数据的 *buffer* 字节数计数。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

在 *AsyncBlock* 回调中或 *AsyncBlock* 完成后调用此方法。

在调用此方法之前，应先调用 [XGameUiShowWebAuthenticationResultSize](/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize)，以便分配足够大小的内存缓冲区来容纳 Web 身份验证响应的结果。

调用此方法后，*buffer* 同时包含 XGameUiWebAuthenticationResultData 结构以及可变响应数据（可通过结果数据结构的 *responseCompletionUri* 字段访问）。

处理完结果数据后，应释放 *buffer* 的内存分配。

有关如何使用此方法的示例，请参阅 [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)\
[XGameUiShowWebAuthenticationResultSize](/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize)\
[XGameUiWebAuthenticationResultData](/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata)\
[异步编程模型](/build/core-features/common/async/async-programming-model)


## Related topics

- [XGameUiShowWebAuthenticationResultSize](/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize.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)
