Skip to main content

XblSocialRelationshipChangedHandler

A callback invoked when a social relationship changes.

Syntax

Parameters

eventArgs   _In_
Type: const XblSocialRelationshipChangeEventArgs*
The arguments associated with the relationship change. The fields of the structure, including the xboxUserIds array, 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 XblSocialAddSocialRelationshipChangedHandler. The context parameter receives the handlerContext value that you passed when you registered the handler. The socialNotification member of eventArgs is XblSocialNotificationType::Added, XblSocialNotificationType::Changed, or XblSocialNotificationType::Removed. Copy any XBOX user IDs that you need after the callback returns. This callback doesn’t receive changes to the number of incoming friend requests. To receive them, register an XblSocialIncomingFriendRequestCountChangedHandler by calling XblSocialAddFriendRequestCountChangedHandler. You don’t need to subscribe to social relationship changes separately. When you add the handler, the XBOX Services API (XSAPI) creates a Real-Time Activity (RTA) subscription for the context’s user, or reuses the existing one.

Argument of

XblSocialAddSocialRelationshipChangedHandler

Requirements

Header: social_c.h Library: Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

See also

social_c
XblSocialRelationshipChangeEventArgs
XblSocialRemoveSocialRelationshipChangedHandler
Last modified on October 29, 2026