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

> Removes a handler that was registered for notifications of changes to the number of incoming friend requests.

# XblSocialRemoveFriendRequestCountChangedHandler

Removes a friend request count change handler.

## Syntax

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

### Parameters

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

The XBOX services context handle that you used to register the handler.

*handlerFunctionContext*   \_In\_\
Type: XblFunctionContext

The token that [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md) passed back when you registered the handler.

### Return value

Type: HRESULT

Returns `S_OK` on success. Returns `E_INVALIDARG` if *xboxLiveContext* is null. If the token doesn't identify a registered handler, the function does nothing and returns `S_OK`.

## Remarks

Call this function only for a handler that you registered with [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md).

Friend request count handlers and social relationship changed handlers share one Real-Time Activity (RTA) subscription for the context's user. After you remove the last handler of both types, the XBOX Services API (XSAPI) removes the subscription.

## 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)\
[XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md)


## Related topics

- [XblSocialAddFriendRequestCountChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialaddfriendrequestcountchangedhandler.md)
- [XblSocialIncomingFriendRequestCountChangedHandler](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialincomingfriendrequestcountchangedhandler.md)
- [Handling a social relationship change](https://docs.xbox.com/services/xbox-services/community/people-system/how-to/live-handling-a-relationship-change.md)
- [social_c (contents)](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)
