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

# XblSocialRemoveFriendRequestCountChangedHandler

> 移除为接收传入好友请求数量更改通知而注册的处理程序。

# XblSocialRemoveFriendRequestCountChangedHandler

移除好友请求数量更改处理程序。

## 语法

```cpp theme={null}
HRESULT XblSocialRemoveFriendRequestCountChangedHandler(  
         XblContextHandle xboxLiveContext,  
         XblFunctionContext handlerFunctionContext  
)  
```

### 参数

*xboxLiveContext*   \_In\_\
类型：[XblContextHandle](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

注册处理程序时使用的 XBOX 服务上下文句柄。

*handlerFunctionContext*   \_In\_\
类型：XblFunctionContext

注册处理程序时 [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md) 传回的令牌。

### 返回值

类型：HRESULT

成功时返回 `S_OK`。如果 *xboxLiveContext* 为 null，则返回 `E_INVALIDARG`。如果该令牌未标识已注册的处理程序，则此函数不执行任何操作并返回 `S_OK`。

## 备注

仅对使用 [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md) 注册的处理程序调用此函数。

好友请求数量处理程序和社交关系更改处理程序共享上下文用户的同一个 Real-Time Activity (RTA) 订阅。移除这两种类型的最后一个处理程序后，XBOX Services API (XSAPI) 会移除该订阅。

## 要求

**头文件：** social\_c.h

**库：** Microsoft.Xbox.Services.142.C.lib 或 Microsoft.Xbox.Services.143.C.lib

## 另请参阅

[social\_c](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/social_c_members.md)\
[XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md)


## Related topics

- [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md)
- [XblSocialIncomingFriendRequestCountChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialincomingfriendrequestcountchangedhandler.md)
- [处理社交关系更改](https://docs.xbox.com/zh-CN/services/xbox-services/community/people-system/how-to/live-handling-a-relationship-change.md)
- [social_c](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/social_c_members.md)
- [XblSocialFriendRequestCountChangedEventArgs](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/structs/xblsocialfriendrequestcountchangedeventargs.md)
