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

# XSystemAnalyticsInfo

> XSystemAnalyticsInfo

# XSystemAnalyticsInfo

現在のデバイスに関する情報を表します。

## Syntax

```cpp theme={null}
typedef struct XSystemAnalyticsInfo {  
    XVersion osVersion;  
    XVersion hostingOsVersion;  
    char family[64];  
    char form[64];  
} XSystemAnalyticsInfo  
```

### Members

*osVersion*\
型: [XVersion](/reference/system/xgameruntimetypes/structs/xversion)

ゲームが実行されているオペレーティング システムのバージョン。XBOX デバイスの場合、この値はタイトル OS のバージョンを表します。デスクトップ デバイスの場合、この値はシステム OS のバージョンを表します。

*hostingOsVersion*\
型: [XVersion](/reference/system/xgameruntimetypes/structs/xversion)

ゲームが起動されたオペレーティング システムのバージョン。XBOX デバイスの場合、この値はシステム OS のバージョンを表します。デスクトップ デバイスの場合、通常この値は *osVersion* の値と同じです。

*family*\
型: char\[64]

デバイス ファミリーの一般的な説明。例: "XBOX" および "Windows"。

*form*\
型: char\[64]

デバイス ファミリー内の特定のハードウェアの種類。例: "XBOX One X DevKit"。

## Remarks

この構造体は、[XSystemGetAnalyticsInfo](/reference/system/xsystem/functions/xsystemgetanalyticsinfo) が呼び出されたときに返されます。この構造体は、現在のデバイスのオペレーティング システムのバージョン、デバイス ファミリー、およびデバイス形態を提供します。

次の例は、**XSystemGetAnalyticsInfo** を呼び出し、**XSystemAnalyticsInfo** の *osVersion* メンバーで返された結果を連結することで、ゲームが実行されているオペレーティング システムのバージョン情報を取得する方法を示しています。

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

}
```

## Requirements

**ヘッダー:** XSystem.h

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体および XBOX Series 本体

## See also

[XSystem](/reference/system/xsystem/xsystem_members)\
[XSystemGetAnalyticsInfo](/reference/system/xsystem/functions/xsystemgetanalyticsinfo)\
[XVersion](/reference/system/xgameruntimetypes/structs/xversion)


## Related topics

- [XSystemGetAnalyticsInfo](/ja-jp/reference/system/xsystem/functions/xsystemgetanalyticsinfo.md)
- [XVersion](/ja-jp/reference/system/xgameruntimetypes/structs/xversion.md)
- [XSystem](/ja-jp/reference/system/xsystem/xsystem_members.md)
- [XSystemRuntimeInfo](/ja-jp/reference/system/xsystem/structs/xsystemruntimeinfo.md)
- [XSystemGetRuntimeInfo](/ja-jp/reference/system/xsystem/functions/xsystemgetruntimeinfo.md)
