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

# PFFriendsClientGetFriendsListAsync

> 检索本地用户的当前好友列表，限于拥有 PlayFab 帐户的用户。已链接帐户（Facebook、Steam）的好友也。

检索本地用户的当前好友列表，限于拥有 PlayFab 帐户的用户。已链接帐户（Facebook、Steam）的好友也包括在内。你可以选择性地排除某些链接服务的好友。

## 语法

```cpp theme={null}
HRESULT PFFriendsClientGetFriendsListAsync(  
    PFEntityHandle entityHandle,  
    const PFFriendsClientGetFriendsListRequest* request,  
    XAsyncBlock* async  
)  
```

### 参数

**`entityHandle`**   PFEntityHandle

用于身份验证的 PFEntityHandle。

**`request`**   [PFFriendsClientGetFriendsListRequest\*](/services/playfab/api-references/c/pffriendstypes/structs/pffriendsclientgetfriendslistrequest)

已填充的请求对象。

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

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 在所有平台上均可用。另请参阅 ClientAddFriendAsync、ClientGetPlayerProfileAsync、ClientRemoveFriendAsync。当异步任务完成时，请调用 [PFFriendsClientGetFriendsListGetResultSize](/services/playfab/api-references/c/pffriends/functions/pffriendsclientgetfriendslistgetresultsize) 和 [PFFriendsClientGetFriendsListGetResult](/services/playfab/api-references/c/pffriends/functions/pffriendsclientgetfriendslistgetresult) 以获取结果。

## 要求

**头文件：** PFFriends.h

## 另请参阅

[PFFriends 成员](/services/playfab/api-references/c/pffriends/pffriends_members)


## Related topics

- [PFFriendsClientGetFriendsListGetResult](/zh-CN/services/playfab/api-references/c/pffriends/functions/pffriendsclientgetfriendslistgetresult.md)
- [Services C API overview - PFFriends.h](/zh-CN/services/playfab/api-references/c/pffriends/pffriends_members.md)
- [PFFriendsClientAddFriendAsync](/zh-CN/services/playfab/api-references/c/pffriends/functions/pffriendsclientaddfriendasync.md)
- [PFFriendsClientGetFriendsListGetResultSize](/zh-CN/services/playfab/api-references/c/pffriends/functions/pffriendsclientgetfriendslistgetresultsize.md)
- [PFFriendsClientGetFriendsListRequest](/zh-CN/services/playfab/api-references/c/pffriendstypes/structs/pffriendsclientgetfriendslistrequest.md)
