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

# XGameStreamingConnectionStateChangedCallback

> XGameStreamingConnectionStateChangedCallback

# XGameStreamingConnectionStateChangedCallback

接続されているストリーミング クライアントの状態が変化するたびに呼び出されるコールバック関数。

## Syntax

```cpp theme={null}
void XGameStreamingConnectionStateChangedCallback(
         void* context,
         XGameStreamingClientId client,
         XGameStreamingConnectionState state
)
```

### Parameters

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

イベントの購読時に指定されたコンテキスト。

*client*   \_In\_\
型: XGameStreamingClientId

イベントが参照するクライアント ストリーミング デバイス。

*state*   \_In\_\
型: [XGameStreamingConnectionState](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)

クライアントの新しい接続状態。

### Return value

型: void

## Remarks

`XGameStreamingClientChangedCallback` は、ストリーミング デバイスが接続または切断されるたびに呼び出されます。

登録時に、接続されている各デバイスに対してもこのコールバックが呼び出されます。

[XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md) を通じて登録すると、既に接続されているデバイスに対してもコールバックが呼び出されます。

## Requirements

**ヘッダー:** xgamestreaming.h

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体および XBOX Series 本体

## See also

[XGameStreamingConnectionState](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)\
[XGameStreamingUnregisterConnectionStateChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged.md)\
[XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)\
[XGameStreaming](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/xgamestreaming_members.md)


## Related topics

- [XGameStreamingUnregisterConnectionStateChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged.md)
- [XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)
- [XGameStreaming (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingUnregisterClientPropertiesChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingunregisterclientpropertieschanged.md)
- [XGameStreamingConnectionState](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)
