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

# XblSocialAddSocialRelationshipChangedHandler

> XblSocialAddSocialRelationshipChangedHandler

# XblSocialAddSocialRelationshipChangedHandler

Registers an event handler for notifications of social relationship changes caused by the registering user.

## Syntax

```cpp theme={null}
XblFunctionContext XblSocialAddSocialRelationshipChangedHandler(  
         XblContextHandle xboxLiveContext,  
         XblSocialRelationshipChangedHandler handler,  
         void* handlerContext  
)  
```

### Parameters

*xboxLiveContext*   \_In\_\
Type: [XblContextHandle](/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

An xbox live context handle created with XblContextCreateHandle.

*handler*   \_In\_\
Type: XblSocialRelationshipChangedHandler

The callback function that receives notifications.

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

Client context pointer to be passed back to the handler.

### Return value

Type: XblFunctionContext

A XblFunctionContext used to remove the handler.

## Remarks

This handler triggers only if the user changes the relationship with another user. This handler does not trigger if another user changes the relationship with the user. Call [XblSocialRemoveSocialRelationshipChangedHandler](/reference/live/xsapi-c/social_c/functions/xblsocialremovesocialrelationshipchangedhandler) to un-register event handler.

## Requirements

**Header:** social\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[social\_c](/reference/live/xsapi-c/social_c/social_c_members)


## Related topics

- [XblSocialRemoveSocialRelationshipChangedHandler](/reference/live/xsapi-c/social_c/functions/xblsocialremovesocialrelationshipchangedhandler.md)
- [Handling a social relationship change](/services/xbox-services/community/people-system/how-to/live-handling-a-relationship-change.md)
- [Social Manager overview](/services/xbox-services/community/social-manager/live-social-manager-overview.md)
- [XblSocialManagerEventType](/reference/live/xsapi-c/social_manager_c/enums/xblsocialmanagereventtype.md)
- [Getting a social relationship](/services/xbox-services/community/people-system/how-to/live-getting-a-social-relationship.md)
