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

# XGameStreamingUnregisterConnectionStateChanged

> XGameStreamingUnregisterConnectionStateChanged

# XGameStreamingUnregisterConnectionStateChanged

以前に登録した [XGameStreamingConnectionStateChangedCallback](/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback) の登録を解除します。

## 構文

```cpp theme={null}
bool XGameStreamingUnregisterConnectionStateChanged(
         XTaskQueueRegistrationToken token,
         bool wait
)
```

### パラメーター

*token*   \_In\_
Type: XTaskQueueRegistrationToken

[XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged) を介して行われたコールバックの登録に対応するトークン。

*wait*   \
Type: bool

`wait` が true に設定されている場合、`XGameStreamingUnregisterConnectionStateChanged` は登録が取り消され、未処理のコールバックがすべて完了するまで戻りません。

`wait` が false に設定されている場合、`XGameStreamingUnregisterConnectionStateChanged` は登録が取り消された時点で戻ります。新しいコールバックは配信されませんが、関数が戻る時点で進行中のコールバックがまだ実行されている場合があります。

### 戻り値

Type: bool

登録解除に成功した場合は true、成功しなかった場合は false を返します。

## 解説

<Note>この関数は、時間的制約のあるスレッドで呼び出すのは安全ではありません。詳細については、「[時間的制約のあるスレッド](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)」を参照してください。</Note>

この API を使用して、ストリーミング クライアント デバイスの接続変更のリッスンを停止できます。

これは、ゲームが [XGameStreamingIsStreaming](/reference/system/xgamestreaming/functions/xgamestreamingisstreaming) を利用してクライアントがストリーミングを行っているかどうかの大まかなチェックのみを行う予定である場合、またはストリーミング クライアント向けにエクスペリエンスの最適化を行う予定がなくなった場合に実行する必要があります。

## 要件

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

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

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

## 概念ドキュメント

* [時間的制約のあるスレッド](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 関連項目

[XGameStreamingConnectionStateChangedCallback](/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback)\
[XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members)


## Related topics

- [XGameStreamingRegisterConnectionStateChanged](/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)
- [XGameStreamingConnectionStateChangedCallback](/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback.md)
- [XGameStreamingConnectionState](/ja-jp/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)
- [XGameStreamingIsStreaming](/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingisstreaming.md)
- [XGameStreaming](/ja-jp/reference/system/xgamestreaming/xgamestreaming_members.md)
