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

Indique si une fonctionnalité du Gaming Runtime est disponible.

## Syntaxe

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

### Paramètres

*feature*   \
Type : [XGameRuntimeFeature](/fr-CA/reference/system/xgameruntimefeature/enums/xgameruntimefeature)

La fonctionnalité du Gaming Runtime à interroger.

### Valeur de retour

Type : bool

Retourne **true** si la fonctionnalité du Gaming Runtime est disponible; sinon, **false**.

## Remarques

Une fois le Gaming Runtime initialisé avec [XGameRuntimeInitialize](/fr-CA/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize), utilisez cette fonction pour vérifier si des fonctionnalités précises du Gaming Runtime sont disponibles pour votre jeu.

L'exemple suivant utilise la fonction **XGameRuntimeIsFeatureAvailable** pour vérifier si les fonctionnalités Async, AsyncProvider et TaskQueue sont disponibles. Ces trois fonctionnalités sont nécessaires pour utiliser des files d'attente de tâches afin d'exécuter des tâches asynchrones.

```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));

}
```

## Configuration requise

**En-tête :** XGameRuntimeFeature.h

**Bibliothèque :** xgameruntime.lib

**Plateformes prises en charge :** Windows, consoles de la famille XBOX One et consoles XBOX Series

## Documentation conceptuelle

* [Présentation de Game Chat 2](/fr-CA/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)

## Voir aussi

[Glossaire du Gaming Runtime](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/intro/gaming-runtime-glossary)\
[Classe XGameRuntimeFeature](/fr-CA/reference/system/xgameruntimefeature/xgameruntimefeature_members)\
[Énumération XGameRuntimeFeature](/fr-CA/reference/system/xgameruntimefeature/enums/xgameruntimefeature)


## Related topics

- [XGameRuntimeIsFeatureAvailable](/reference/system/xgameruntimefeature/functions/xgameruntimeisfeatureavailable.md)
- [XGameRuntimeFeature](/reference/system/xgameruntimefeature/enums/xgameruntimefeature.md)
