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

# PFAuthenticationLoginWithBattleNetAsync

> 在 Windows 上使用 Battle.net 身份令牌为用户登录的客户端 API。任务完成后，调用 PFAuthenticationLoginWithBattleNetGetResult。

使用 Battle.net 身份令牌为用户登录

## 语法

```cpp theme={null}
HRESULT PFAuthenticationLoginWithBattleNetAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const PFAuthenticationLoginWithBattleNetRequest* request,  
    XAsyncBlock* async  
)  
```

### 参数

**`serviceConfigHandle`**   PFServiceConfigHandle

从 PFServiceConfigCreateHandle 调用返回的 PFServiceConfigHandle。

**`request`**   [PFAuthenticationLoginWithBattleNetRequest\*](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithbattlenetrequest)

已填充的请求对象。

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

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 可在 Windows 上使用。另请参阅 ClientLinkBattleNetAccountAsync、ClientUnlinkBattleNetAccountAsync。异步任务完成后，调用 [PFAuthenticationLoginWithBattleNetGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithbattlenetgetresult) 获取结果。

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

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


## Related topics

- [PFAuthenticationLoginWithBattleNetGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithbattlenetgetresultsize.md)
- [PFAuthenticationLoginWithBattleNetGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithbattlenetgetresult.md)
- [PFAuthenticationServerLoginWithBattleNetAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithbattlenetasync.md)
- [PFAuthenticationReLoginWithBattleNetAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithbattlenetasync.md)
- [PFAuthenticationServerLoginWithBattleNetGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithbattlenetgetresult.md)
