| 206 | } |
| 207 | |
| 208 | static DeviceType GetDeviceType() |
| 209 | { |
| 210 | winrt::hstring deviceFamily = winrtWSP::AnalyticsInfo::VersionInfo().DeviceFamily(); |
| 211 | if (deviceFamily == L"Windows.Desktop") { |
| 212 | return DeviceType::Desktop; |
| 213 | } else if (deviceFamily == L"Windows.Mobile" || deviceFamily == L"Windows.Tablet") { |
| 214 | return DeviceType::Mobile; |
| 215 | } else if (deviceFamily == L"Windows.Iot") { |
| 216 | return DeviceType::Iot; |
| 217 | } else if (deviceFamily == L"Windows.Xbox") { |
| 218 | return DeviceType::Xbox; |
| 219 | } else { |
| 220 | return DeviceType::Unknown; |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | const std::uint64_t WindowsVersion = GetWindowsVersion(); |
| 225 | const DeviceType CurrentDeviceType = GetDeviceType(); |