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

# PFAuthenticationServerLoginWithXboxIdGetResult

> 获取 PFAuthenticationServerLoginWithXboxIdAsync 调用的结果。始终会返回 PFEntityHandle，但仅在提供缓冲区时才会返回。

获取 PFAuthenticationServerLoginWithXboxIdAsync 调用的结果。始终会返回 PFEntityHandle，但只有在提供缓冲区时，才会返回 PFAuthenticationLoginResult 中的其他信息。

## 语法

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

### 参数

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

用于异步操作的 XAsyncBlock。

**`entityTokenResponse`**   [PFAuthenticationEntityTokenResponse](/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)*

用于登录结果值及其字段的字节缓冲区。

**`result`**   [PFAuthenticationLoginResult](/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\_REQUEST\_VIEW\_CONSTRAINT\_PARAMS\_NOT\_ALLOWED、E\_PF\_XBOX\_INACCESSIBLE、E\_PF\_XBOX\_REJECTED\_XSTS\_EXCHANGE\_REQUEST、E\_PF\_XBOX\_XASS\_EXCHANGE\_FAILURE 或任一全局 PlayFab 服务错误。有关错误处理的更多详细信息，请参阅文档页“处理 PlayFab 错误”。

## 备注

如果 PFAuthenticationServerLoginWithXboxIdAsync 调用失败，entityHandle 将为 null。否则，当不再需要该句柄时，必须使用 PFEntityCloseHandle 将其关闭。如果返回，“result”是指向“buffer”内的指针，无需单独释放。

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

[PFAuthentication 成员](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithXboxIdAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidasync.md)
- [服务 C API 概览 - PFAuthentication.h](/zh-CN/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithXboxIdGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithxboxidgetresultsize.md)
- [PFAuthenticationServerLoginWithServerCustomIdGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithservercustomidgetresult.md)
- [PFAuthenticationServerLoginWithSteamIdGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithsteamidgetresult.md)
