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

# XAppBroadcastRegisterIsAppBroadcastingChanged

> XAppBroadcastRegisterIsAppBroadcastingChanged

# XAppBroadcastRegisterIsAppBroadcastingChanged

アプリ ブロードキャスト ステータスの変更イベント ハンドラーを登録します。

## 構文

```cpp theme={null}
HRESULT XAppBroadcastRegisterIsAppBroadcastingChanged(  
         XTaskQueueHandle queue,  
         void* context,  
         XAppBroadcastMonitorCallback* appBroadcastMonitorCallback,  
         XTaskQueueRegistrationToken* token  
)  
```

### パラメーター

*queue*   \_In\_opt\_\
型: XTaskQueueHandle

オプションの XTaskQueueHandle。ユーザーは、このキューから実行される独自のコールバックを作成できます。

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

コールバック関数に渡されるオプション情報です。

*appBroadcastMonitorCallback*   \_In\_\
型: XAppBroadcastMonitorCallback\*

ブロードキャストできるかどうかのステータスが変更された時のコールバックです。 ゲームはこれを使用して、ブロードキャスト UI の表示を有効にしても安全かどうかを判断できます。

*token*   \_Out\_\
型: XTaskQueueRegistrationToken\*

ブロードキャスト トークンです。

### 戻り値

型: HRESULT

関数の結果です。

## 解説

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

**AppBroadcastRegisterIsAppBroadcastingChanged** を呼び出すたびに、イベント ハンドラーが不要になった時点で [XAppBroadcastUnregisterIsAppBroadcastingChanged](/reference/system/xappcapture/functions/xappbroadcastunregisterisappbroadcastingchanged) を呼び出してください。 登録解除関数を呼び出さないと、メモリ リークが発生します。 この関数は、アプリ ブロードキャストのステータスが変更されたときに呼び出される 2 番目の関数 [XAppBroadcastMonitorCallback](/reference/system/xappcapture/functions/xappbroadcastmonitorcallback) を登録します。

## 要件

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

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

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

## 概念ドキュメント

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 関連項目

[GameDVR の概要](/build/console-features/game-dvr/gamedvr-broadcast)\
[XAppCapture メンバー](/reference/system/xappcapture/xappcapture_members)\
[XAppBroadcastUnregisterIsAppBroadcastingChanged](/reference/system/xappcapture/functions/xappbroadcastunregisterisappbroadcastingchanged)\
[XAppBroadcastMonitorCallback](/reference/system/xappcapture/functions/xappbroadcastmonitorcallback)


## Related topics

- [XAppBroadcastUnregisterIsAppBroadcastingChanged](/ja-jp/reference/system/xappcapture/functions/xappbroadcastunregisterisappbroadcastingchanged.md)
- [XAppBroadcastMonitorCallback](/ja-jp/reference/system/xappcapture/functions/xappbroadcastmonitorcallback.md)
- [XTaskQueueRegistrationToken](/ja-jp/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)
- [XAppCapture](/ja-jp/reference/system/xappcapture/xappcapture_members.md)
- [GDK 向け Unity C# API ラッパー](/ja-jp/build/gdk-and-engines/unity/unity-api-wrappers.md)
