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

# XblSocialIncomingFriendRequestCountChangedHandler

> 定义在用户收到的好友请求数量发生更改时调用的回调。

# XblSocialIncomingFriendRequestCountChangedHandler

在用户收到的好友请求数量发生更改时调用的回调。

## 语法

```cpp theme={null}
typedef void (STDAPIVCALLTYPE* XblSocialIncomingFriendRequestCountChangedHandler)(  
         _In_ const XblSocialFriendRequestCountChangedEventArgs* eventArgs,  
         _In_opt_ void* context  
);  
```

### 参数

*eventArgs*   \_In\_\
类型：[const XblSocialFriendRequestCountChangedEventArgs\*](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/structs/xblsocialfriendrequestcountchangedeventargs.md)

与该更改关联的参数。该结构的字段仅在回调期间有效。

*context*   \_In\_opt\_\
类型：void\*

添加处理程序时提供的上下文。

### 返回值

类型：void

## 备注

通过调用 [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md) 注册此回调。*context* 参数接收你在注册处理程序时传递的 *handlerContext* 值。

*eventArgs* 的 `incomingFriendRequestCount` 成员包含当前待处理的传入好友请求数量。请复制回调返回后仍需使用的任何值。

XBOX Services API (XSAPI) 会忽略不包含数量的好友请求数量通知，因此不会为此类通知调用回调。

## 参数属于

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

## 要求

**头文件：** 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)\
[XblSocialFriendRequestCountChangedEventArgs](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/structs/xblsocialfriendrequestcountchangedeventargs.md)\
[XblSocialRemoveFriendRequestCountChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialremovefriendrequestcountchangedhandler.md)


## Related topics

- [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md)
- [XblSocialFriendRequestCountChangedEventArgs](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/structs/xblsocialfriendrequestcountchangedeventargs.md)
- [XblSocialNotificationType](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/enums/xblsocialnotificationtype.md)
- [XblSocialRelationshipChangedHandler](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipchangedhandler.md)
- [social_c](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/social_c/social_c_members.md)
