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

# PFAuthenticationServerLoginWithXboxGetResult

> 取得 PFAuthenticationServerLoginWithXboxAsync 呼叫的結果。一律會傳回 PFEntityHandle，但只有在提供緩衝區時，才會傳回 PFAuthenticationLoginResult 中的其他資訊。

取得 PFAuthenticationServerLoginWithXboxAsync 呼叫的結果。一律會傳回 PFEntityHandle，但只有在提供緩衝區時，才會傳回 PFAuthenticationLoginResult 中的其他資訊。

## 語法

```cpp theme={null}
HRESULT PFAuthenticationServerLoginWithXboxGetResult(  
    XAsyncBlock* async,  
    const PFAuthenticationEntityTokenResponse** entityTokenResponse,  
    size_t bufferSize,  
    void* buffer,  
    const PFAuthenticationLoginResult** result,  
    size_t* bufferUsed  
)  
```

### 參數

**`async`**   XAsyncBlock\*<br />*Inout*

用於非同步作業的 XAsyncBlock。

**`entityTokenResponse`**   [PFAuthenticationEntityTokenResponse\*\*](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationentitytokenresponse)<br />*library-allocated output*

TBD

**`bufferSize`**   size\_t

結果物件的緩衝區大小。

**`buffer`**   void\*<br />\**Out\_writes\_bytes\_to*(bufferSize,*bufferUsed)*

用於 Login 結果值及其欄位的位元組緩衝區。

**`result`**   [PFAuthenticationLoginResult\*\*](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginresult)<br />*optional, library-allocated output*

LoginResult 物件的指標。

**`bufferUsed`**   size\_t\*<br />*optional output*

所提供緩衝區中已使用的位元組數。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。如果服務呼叫失敗，結果將為 E\_PF\_EVALUATION\_MODE\_PLAYER\_COUNT\_EXCEEDED、E\_PF\_EXPIRED\_XBOX\_LIVE\_TOKEN、E\_PF\_INVALID\_XBOX\_LIVE\_TOKEN、E\_PF\_REQUEST\_VIEW\_CONSTRAINT\_PARAMS\_NOT\_ALLOWED、E\_PF\_XBOX\_INACCESSIBLE、E\_PF\_XBOX\_REJECTED\_XSTS\_EXCHANGE\_REQUEST、E\_PF\_XBOX\_XASS\_EXCHANGE\_FAILURE 或任何全域 PlayFab 服務錯誤。如需錯誤處理的詳細資訊，請參閱文件頁面「Handling PlayFab Errors」。

## 備註

如果 PFAuthenticationServerLoginWithXboxAsync 呼叫失敗，entityHandle 將為 null。否則，當不再需要該控制代碼時，必須使用 PFEntityCloseHandle 將其關閉。如果有傳回，'result' 是 'buffer' 內的指標，不需要另外釋放。

## 需求

**標頭：** PFAuthentication.h

## 另請參閱

[PFAuthentication 成員](/zh-TW/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithXboxAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxasync.md)
- [服務 C API 概觀 - PFAuthentication.h](/zh-TW/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithXboxGetResultSize](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxgetresultsize.md)
- [PFAuthenticationServerLoginWithXboxIdGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidgetresult.md)
- [PFAuthenticationServerLoginWithXboxIdGetResultSize](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidgetresultsize.md)
