XSystemAnalyticsInfo

Represents information about the current device.

Syntax

typedef struct XSystemAnalyticsInfo {  
    XVersion osVersion;  
    XVersion hostingOsVersion;  
    char family[64];  
    char form[64];  
} XSystemAnalyticsInfo  

Members

osVersion
Type: XVersion

The version of the operating system on which the game is running. For Xbox devices, this value represents the version of the title OS. For desktop devices, this value represents the version of the system OS.

hostingOsVersion
Type: XVersion

The version of the operating system from which the game was launched. For Xbox devices, this value represents the version of the system OS. For desktop devices, this value is typically the same as the value of osVersion.

family
Type: char[64]

The general description of the device family. Examples: "Xbox" and "Windows".

form
Type: char[64]

The specific type of hardware in the device family. Example: "Xbox One X DevKit".

Remarks

This structure is returned when XSystemGetAnalyticsInfo is called. The structure provides the current device's operating system versions, device family, and device form.

The following example illustrates how to retrieve the version information for the operating system in which a game is running, by invoking XSystemGetAnalyticsInfo and concatenating the results returned in the osVersion member of XSystemAnalyticsInfo.

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

}

Requirements

Header: XSystem.h

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XSystem
XSystemGetAnalyticsInfo
XVersion