> ## 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](/zh-TW/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\*](/zh-TW/reference/system/xasync/structs/xasyncblock)

指向傳遞給 [XGameUiShowWebAuthenticationAsync](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationasync) 之 [XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock) 的指標。

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

用來接收已完成驗證要求之結果資料的緩衝區大小 (以位元組為單位)。

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

指向用來接收已完成驗證要求之結果資料的緩衝區指標。此緩衝區會保存結果資料結構，以及可變大小的回應資料。

*ptrToBuffer*   \_Outptr\_\
類型：[XGameUiWebAuthenticationResultData\*\*](/zh-TW/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata)

結果資料結構的參考指標。結果資料結構會儲存在傳入的 *buffer* 中。

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

*buffer* 中用來儲存結果資料和可變回應資料的位元組數目。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

請在 *AsyncBlock* 回呼內或 *AsyncBlock* 完成之後呼叫此方法。

呼叫此方法之前，您應先呼叫 [XGameUiShowWebAuthenticationResultSize](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize)，以便配置大小足以容納網頁驗證回應結果的記憶體緩衝區。

呼叫此方法之後，*buffer* 會同時包含 XGameUiWebAuthenticationResultData 結構以及可變回應資料 (可透過結果資料結構的 *responseCompletionUri* 欄位存取)。

當您完成處理結果資料之後，應釋放 *buffer* 記憶體配置。

如需如何使用此方法的範例，請參閱 [XGameUiShowWebAuthenticationAsync](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationasync) 中的程式碼範例。

## 需求

**標頭：** XGameUI.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[XGameUI](/zh-TW/reference/system/xgameui/xgameui_members)\
[XGameUiShowWebAuthenticationAsync](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationasync)\
[XGameUiShowWebAuthenticationResultSize](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize)\
[XGameUiWebAuthenticationResultData](/zh-TW/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata)\
[非同步程式設計模型](/zh-TW/build/core-features/common/async/async-programming-model)


## Related topics

- [XGameUiShowWebAuthenticationResult](/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md)
- [XGameUiShowWebAuthenticationResultSize](/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize.md)
