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

> Defines a callback that's invoked when the number of incoming friend requests for a user changes.

# XblSocialIncomingFriendRequestCountChangedHandler

A callback invoked when the number of incoming friend requests for a user changes.

## Syntax

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

### Parameters

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

The arguments associated with the change. The fields of the structure are valid only during the callback.

*context*   \_In\_opt\_\
Type: void\*

The context that was provided when the handler was added.

### Return value

Type: void

## Remarks

Register this callback by calling [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md). The *context* parameter receives the *handlerContext* value that you passed when you registered the handler.

The `incomingFriendRequestCount` member of *eventArgs* contains the current number of pending incoming friend requests. Copy any values that you need after the callback returns.

The XBOX Services API (XSAPI) ignores a friend request count notification that doesn't include a count, so the callback isn't invoked for it.

## Argument of

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

## Requirements

**Header:** social\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[social\_c](https://docs.xbox.com/reference/live/xsapi-c/social_c/social_c_members.md)\
[XblSocialFriendRequestCountChangedEventArgs](https://docs.xbox.com/reference/live/xsapi-c/social_c/structs/xblsocialfriendrequestcountchangedeventargs.md)\
[XblSocialRemoveFriendRequestCountChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialremovefriendrequestcountchangedhandler.md)


## Related topics

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