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

# XGameRuntimeIsFeatureAvailable

> XGameRuntimeIsFeatureAvailable

# XGameRuntimeIsFeatureAvailable

Gaming Runtime 機能が使用可能かどうかを示します。

## Syntax

```cpp theme={null}
bool XGameRuntimeIsFeatureAvailable(  
         XGameRuntimeFeature feature  
)  
```

### Parameters

*feature*   \
型: [XGameRuntimeFeature](https://docs.xbox.com/ja-jp/reference/system/xgameruntimefeature/enums/xgameruntimefeature.md)

照会する Gaming Runtime 機能。

### Return value

型: bool

Gaming Runtime 機能が使用可能な場合は **true**、それ以外の場合は **false** を返します。

## Remarks

Gaming Runtime が [XGameRuntimeInitialize](https://docs.xbox.com/ja-jp/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md) で初期化された後、この関数を使用して、特定の Gaming Runtime 機能がゲームで使用可能かどうかを確認します。

次の例では、**XGameRuntimeIsFeatureAvailable** 関数を使用して、Async、AsyncProvider、および TaskQueue の各機能が使用可能かどうかを確認します。タスク キューを使用して非同期タスクを実行するには、これら 3 つの機能すべてが必要です。

```cpp theme={null}
// Confirm that all of the features needed to run asynchronous tasks on 
// task queues are available.
bool Game::CheckAsyncTaskQueueFeatures()
{
    
    return (XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XTaskQueue) &&
        XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XAsyncProvider) &&
        XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XAsync));

}
```

## Requirements

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

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

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

## Conceptual documentation

* [Intro to Game Chat 2](https://docs.xbox.com/ja-jp/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md)

## See also

[Gaming Runtime Glossary](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/intro/gaming-runtime-glossary)\
[XGameRuntimeFeature class](https://docs.xbox.com/ja-jp/reference/system/xgameruntimefeature/xgameruntimefeature_members.md)\
[XGameRuntimeFeature enum](https://docs.xbox.com/ja-jp/reference/system/xgameruntimefeature/enums/xgameruntimefeature.md)


## Related topics

- [XGameRuntimeFeature リファレンス](https://docs.xbox.com/ja-jp/reference/system/xgameruntimefeature/enums/xgameruntimefeature.md)
- [XGameRuntimeFeature (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xgameruntimefeature/xgameruntimefeature_members.md)
- [Game Chat 2 の概要](https://docs.xbox.com/ja-jp/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md)
- [Windows Sockets の概要](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/winsock-intro-networking.md)
- [XSystemRuntimeInfo](https://docs.xbox.com/ja-jp/reference/system/xsystem/structs/xsystemruntimeinfo.md)
