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

登録したユーザーによって引き起こされたソーシャル リレーションシップの変更を通知するイベント ハンドラーを登録します。

## 構文

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

### パラメーター

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

XblContextCreateHandle で作成された XBOX Live コンテキスト ハンドル。

*handler*   \_In\_\
型: XblSocialRelationshipChangedHandler

通知を受け取るコールバック関数。

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

ハンドラーに渡されるクライアント コンテキスト ポインター。

### 戻り値

型: XblFunctionContext

ハンドラーを削除するために使用される XblFunctionContext。

## 解説

このハンドラーは、ユーザーが別のユーザーとのリレーションシップを変更した場合にのみ起動します。別のユーザーがそのユーザーとのリレーションシップを変更した場合は起動しません。イベント ハンドラーの登録を解除するには [XblSocialRemoveSocialRelationshipChangedHandler](/reference/live/xsapi-c/social_c/functions/xblsocialremovesocialrelationshipchangedhandler) を呼び出します。

## 要件

**ヘッダー:** social\_c.h

**ライブラリ:** Microsoft.Xbox.Services.14x.GDK.C.lib

## 関連項目

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


## Related topics

- [XblSocialRemoveSocialRelationshipChangedHandler](/ja-jp/reference/live/xsapi-c/social_c/functions/xblsocialremovesocialrelationshipchangedhandler.md)
- [ソーシャル リレーションシップ変更の処理](/ja-jp/services/xbox-services/community/people-system/how-to/live-handling-a-relationship-change.md)
- [XblSocialRelationship](/ja-jp/reference/live/xsapi-c/social_c/structs/xblsocialrelationship.md)
- [XblSocialGetSocialRelationshipsAsync](/ja-jp/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsasync.md)
- [XblSocialGetSocialRelationshipsResult](/ja-jp/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsresult.md)
