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

# XGameRuntimeIsFeatureAvailable

> XGameRuntimeIsFeatureAvailable

# XGameRuntimeIsFeatureAvailable

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

## Syntax

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

### Parameters

*feature*   \
型: [XGameRuntimeFeature](/reference/system/xgameruntimefeature/enums/xgameruntimefeature)

照会する Gaming Runtime 機能。

### Return value

型: bool

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

## Remarks

Gaming Runtime が [XGameRuntimeInitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize) で初期化された後、この関数を使用して、特定の 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](/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)

## See also

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


## Related topics

- [XGameRuntimeFeature](/ja-jp/reference/system/xgameruntimefeature/enums/xgameruntimefeature.md)
- [XGameRuntimeFeature (API contents)](/ja-jp/reference/system/xgameruntimefeature/xgameruntimefeature_members.md)
- [GDK での Windows Sockets の紹介](/ja-jp/build/console-features/networking/game-mesh/winsock-intro-networking.md)
- [XSystemRuntimeInfo](/ja-jp/reference/system/xsystem/structs/xsystemruntimeinfo.md)
- [XGameRuntimeInitialize](/ja-jp/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md)
