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

Fornece informações de diagnóstico sobre o sistema operacional e o dispositivo em que o jogo está em execução.

## Sintaxe

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

### Parâmetros

Nenhum.

### Valor retornado

Tipo: [XSystemAnalyticsInfo](/pt-BR/reference/system/xsystem/structs/xsystemanalyticsinfo)

Retorna uma estrutura [XSystemAnalyticsInfo](/pt-BR/reference/system/xsystem/structs/xsystemanalyticsinfo) que contém informações sobre o dispositivo atual.

## Comentários

<Note>Não é seguro chamar esta função em um thread sensível ao tempo. Para obter mais informações, consulte [Threads sensíveis ao tempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

A função **XSystemGetAnalyticsInfo** retorna uma estrutura [XSystemAnalyticsInfo](/pt-BR/reference/system/xsystem/structs/xsystemanalyticsinfo) que contém informações de diagnóstico sobre o dispositivo atual. Essas informações incluem as versões do sistema operacional em que o jogo está em execução e do sistema operacional a partir do qual o jogo foi iniciado, bem como a família e o formato do dispositivo.

O exemplo a seguir ilustra como recuperar as informações de versão do sistema operacional em que um jogo está em execução, invocando **XSystemGetAnalyticsInfo** e concatenando os resultados retornados no membro *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);

}
```

## Requisitos

**Cabeçalho:** XSystem.h

**Biblioteca:** xgameruntime.lib

**Plataformas com suporte:** Windows, consoles da família XBOX One e consoles XBOX Series

## Documentação conceitual

* [Threads sensíveis ao tempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## Confira também

[XSystem](/pt-BR/reference/system/xsystem/xsystem_members)\
[XSystemAnalyticsInfo](/pt-BR/reference/system/xsystem/structs/xsystemanalyticsinfo)


## Related topics

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