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

# PFAuthenticationLoginWithBattleNetGetResult

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

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

## 语法

```cpp theme={null}
HRESULT PFAuthenticationLoginWithBattleNetGetResult(  
    XAsyncBlock* async,  
    PFEntityHandle* entityHandle,  
    size_t bufferSize,  
    void* buffer,  
    const PFAuthenticationLoginResult** result,  
    size_t* bufferUsed  
)  
```

### 参数

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

用于异步操作的 XAsyncBlock。

**`entityHandle`**   PFEntityHandle\*<br />*output*

可用于对其他 PlayFab API 调用进行身份验证的 PFEntityHandle。

**`bufferSize`**   size\_t

用于结果对象的缓冲区大小。

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

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

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

指向 LoginResult 对象的指针。

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

所提供缓冲区中已使用的字节数。

### 返回值

类型：HRESULT

此 API 操作的结果代码。如果服务调用失败，结果将是 E\_PF\_ACCOUNT\_NOT\_FOUND、E\_PF\_BATTLE\_NET\_NOT\_ENABLED\_FOR\_TITLE、E\_PF\_ENCRYPTION\_KEY\_MISSING、E\_PF\_EVALUATION\_MODE\_PLAYER\_COUNT\_EXCEEDED、E\_PF\_INVALID\_AUTH\_TOKEN、E\_PF\_INVALID\_SIGNATURE、E\_PF\_INVALID\_SIGNATURE\_TIME、E\_PF\_INVALID\_TITLE\_ID、E\_PF\_PLAYER\_SECRET\_ALREADY\_CONFIGURED、E\_PF\_PLAYER\_SECRET\_NOT\_CONFIGURED、E\_PF\_REQUEST\_VIEW\_CONSTRAINT\_PARAMS\_NOT\_ALLOWED 或任一全局 PlayFab 服务错误。有关错误处理的更多详细信息，请参阅文档页“处理 PlayFab 错误”。

## 备注

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

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

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


## Related topics

- [PFAuthenticationLoginWithBattleNetAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithbattlenetasync.md)
- [PFAuthenticationLoginWithBattleNetGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithbattlenetgetresultsize.md)
- [PFAuthenticationServerLoginWithBattleNetGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithbattlenetgetresult.md)
- [PFAuthenticationServerLoginWithBattleNetGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithbattlenetgetresultsize.md)
- [PFAuthenticationServerLoginWithBattleNetAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithbattlenetasync.md)
