> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFFriendsServerRemoveFriendAsync

> 从用户的好友列表中移除指定的好友

从用户的好友列表中移除指定的好友

## 语法

```cpp theme={null}
HRESULT PFFriendsServerRemoveFriendAsync(  
    PFEntityHandle titleEntityHandle,  
    const PFFriendsServerRemoveFriendRequest* request,  
    XAsyncBlock* async  
)  
```

### 参数

**`titleEntityHandle`**   PFEntityHandle

使用 PFAuthenticationGetEntityWithSecretKeyAsync 获取的标题实体的 PFEntityHandle。

**`request`**   [PFFriendsServerRemoveFriendRequest\*](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pffriendstypes/structs/pffriendsserverremovefriendrequest.md)

已填充的请求对象。

**`async`**   XAsyncBlock\*\
*Inout*

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 在 Win32、Linux 和 macOS 上可用。另请参阅 ServerAddFriendAsync、ServerSetFriendTagsAsync。调用 XAsyncGetStatus 以获取操作状态。如果服务调用失败，异步结果将是 E\_PF\_ACCOUNT\_NOT\_FOUND 或任何全局 PlayFab 服务错误。有关错误处理的详细信息，请参阅文档页面“Handling PlayFab Errors”。

## 要求

**头文件：** PFFriends.h

## 另请参阅

[PFFriends 成员](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pffriends/pffriends_members.md)


## Related topics

- [Services C API overview - PFFriends.h](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pffriends/pffriends_members.md)
- [PFFriendsServerAddFriendAsync](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pffriends/functions/pffriendsserveraddfriendasync.md)
- [PFFriendsServerRemoveFriendRequest](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pffriendstypes/structs/pffriendsserverremovefriendrequest.md)
- [PFFriendsServerGetFriendsListAsync](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pffriends/functions/pffriendsservergetfriendslistasync.md)
- [PFFriendsClientRemoveFriendAsync](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pffriends/functions/pffriendsclientremovefriendasync.md)
