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

# XClosedCaptionGetProperties

> XClosedCaptionGetProperties

# XClosedCaptionGetProperties

現在のクローズド キャプションのプロパティを返します。

## 構文

```cpp theme={null}
HRESULT XClosedCaptionGetProperties(  
         XClosedCaptionProperties* properties  
)  
```

### パラメーター

*properties*   \_Out\_\
型: [XClosedCaptionProperties\*](/reference/system/xaccessibility/structs/xclosedcaptionproperties)

関数から戻ったとき、*properties* には現在のクローズド キャプション プロパティが格納されます。

### 戻り値

型: HRESULT

クローズド キャプションが有効で、*properties* に現在の [XClosedCaptionProperties](/reference/system/xaccessibility/structs/xclosedcaptionproperties) が含まれる場合は HRESULT。 それ以外の場合はエラー コードを返します。\
エラー コードの一覧については、「[エラー コード](/reference/errorcodes)」を参照してください。

## 解説

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

この関数を成功させるには、クローズド キャプションを有効にする必要があります。
ユーザーがゲーム タイトルの UI でクローズド キャプション機能を有効にする必要があります。
ユーザーがクローズド キャプションを有効にした場合、ゲーム タイトルは [XClosedCaptionSetEnabled](/reference/system/xaccessibility/functions/xclosedcaptionsetenabled) を呼び出すことでクローズド キャプションのステータスをフラグとして設定できます。

次の例は、クローズド キャプション プロパティを取得する方法を示しています。

```cpp theme={null}
XClosedCaptionProperties ccProperties;
if (SUCCEEDED(XClosedCaptionGetProperties(&ccProperties))
{
    // The game title can now access color and font settings in the ccProperties structure.
}
```

## 要件

**ヘッダー:** XAccessibility.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)

## 関連項目

[XAccessibility](/reference/system/xaccessibility/xaccessibility_members)

[XClosedCaptionProperties](/reference/system/xaccessibility/structs/xclosedcaptionproperties)

[XClosedCaptionSetEnabled](/reference/system/xaccessibility/functions/xclosedcaptionsetenabled)


## Related topics

- [XClosedCaptionProperties](/ja-jp/reference/system/xaccessibility/structs/xclosedcaptionproperties.md)
- [XClosedCaptionFontStyle](/ja-jp/reference/system/xaccessibility/enums/xclosedcaptionfontstyle.md)
- [XClosedCaptionSetEnabled](/ja-jp/reference/system/xaccessibility/functions/xclosedcaptionsetenabled.md)
- [XClosedCaptionFontEdgeAttribute](/ja-jp/reference/system/xaccessibility/enums/xclosedcaptionfontedgeattribute.md)
- [XAG 104: 字幕とキャプション](/ja-jp/build/game-principles/accessibility/xag-deep-dives/xag-104-subtitles-captions.md)
