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

Proporciona información de diagnóstico sobre el sistema operativo y el dispositivo en el que se está ejecutando el juego.

## Sintaxis

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

### Parámetros

Ninguno.

### Valor devuelto

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

Devuelve una estructura [XSystemAnalyticsInfo](/reference/system/xsystem/structs/xsystemanalyticsinfo) que contiene información sobre el dispositivo actual.

## Comentarios

<Note>No es seguro llamar a esta función en un subproceso sensible al tiempo. Para obtener más información, consulte [Subprocesos sensibles al tiempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

La función **XSystemGetAnalyticsInfo** devuelve una estructura [XSystemAnalyticsInfo](/reference/system/xsystem/structs/xsystemanalyticsinfo) que contiene información de diagnóstico sobre el dispositivo actual. Esta información incluye las versiones tanto del sistema operativo en el que se está ejecutando el juego como del sistema operativo desde el que se inició el juego, así como la familia y la forma del dispositivo.

El siguiente ejemplo ilustra cómo recuperar la información de versión del sistema operativo en el que se está ejecutando un juego, invocando **XSystemGetAnalyticsInfo** y concatenando los resultados devueltos en el miembro *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

**Encabezado:** XSystem.h

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** Windows, consolas de la familia XBOX One y consolas XBOX Series

## Documentación conceptual

* [Subprocesos sensibles al tiempo](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## Consulte también

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


## Related topics

- [XSystemAnalyticsInfo](/es/reference/system/xsystem/structs/xsystemanalyticsinfo.md)
- [XSystem](/es/reference/system/xsystem/xsystem_members.md)
- [XSystemGetRuntimeInfo](/es/reference/system/xsystem/functions/xsystemgetruntimeinfo.md)
- [XVersion](/es/reference/system/xgameruntimetypes/structs/xversion.md)
- [Inicio rápido de los informes](/es/services/playfab/data-analytics/learn-data/reports/quickstart.md)
