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

# XSystemGetAnalyticsInfo

> XSystemGetAnalyticsInfo

# XSystemGetAnalyticsInfo

Fournit des informations de diagnostic sur le système d'exploitation et l'appareil sur lesquels le jeu s'exécute.

## Syntaxe

```cpp theme={null}
XSystemAnalyticsInfo XSystemGetAnalyticsInfo(  
)  
```

### Paramètres

Aucun.

### Valeur de retour

Type : [XSystemAnalyticsInfo](/fr/reference/system/xsystem/structs/xsystemanalyticsinfo)

Retourne une structure [XSystemAnalyticsInfo](/fr/reference/system/xsystem/structs/xsystemanalyticsinfo) qui contient des informations sur l'appareil actuel.

## Remarques

<Note>Cette fonction ne peut pas être appelée en toute sécurité sur un thread à contrainte de temps. Pour plus d'informations, consultez [Threads à contrainte de temps](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

La fonction **XSystemGetAnalyticsInfo** retourne une structure [XSystemAnalyticsInfo](/fr/reference/system/xsystem/structs/xsystemanalyticsinfo) qui contient des informations de diagnostic sur l'appareil actuel. Ces informations incluent les versions du système d'exploitation dans lequel le jeu s'exécute et du système d'exploitation à partir duquel le jeu a été lancé, ainsi que la famille et le format de l'appareil.

L'exemple suivant montre comment récupérer les informations de version du système d'exploitation dans lequel un jeu s'exécute, en appelant **XSystemGetAnalyticsInfo** et en concaténant les résultats retournés dans le membre *osVersion* de **XSystemAnalyticsInfo**.

```cpp theme={null}
// Get the version of the operating system in which the game is running.
std::string Game::GetGameOSVersion()
{
    // Call XSystemGetAnalyticsInfo()
    XSystemAnalyticsInfo info = XSystemGetAnalyticsInfo();

    // Return a formatted string from the osVersion member of XSystemAnalyticsInfo.
    return std::to_string(info.osVersion.major) + "." +
        std::to_string(info.osVersion.minor) + "." +
        std::to_string(info.osVersion.build) + "." +
        std::to_string(info.osVersion.revision);

}
```

## Configuration requise

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

**Bibliothèque :** xgameruntime.lib

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

## Documentation conceptuelle

* [Threads à contrainte de temps](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## Voir aussi

[XSystem](/fr/reference/system/xsystem/xsystem_members)\
[XSystemAnalyticsInfo](/fr/reference/system/xsystem/structs/xsystemanalyticsinfo)


## Related topics

- [XSystemGetAnalyticsInfo](/reference/system/xsystem/functions/xsystemgetanalyticsinfo.md)
- [XSystemAnalyticsInfo](/reference/system/xsystem/structs/xsystemanalyticsinfo.md)
