blob: 456708f05b170b9ebdd293ce994578b4797cd1f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <windows.h>
#include <assert.h>
#include <locale.h>
#include <stdio.h>
#include <iostream>
int main() {
setlocale(LC_ALL, "");
OSVERSIONINFOEXW info = {0};
info.dwOSVersionInfoSize = sizeof(info);
assert(GetVersionExW((OSVERSIONINFOW*)&info));
printf("dwMajorVersion = %d\n", (int)info.dwMajorVersion);
printf("dwMinorVersion = %d\n", (int)info.dwMinorVersion);
printf("dwBuildNumber = %d\n", (int)info.dwBuildNumber);
printf("dwPlatformId = %d\n", (int)info.dwPlatformId);
printf("szCSDVersion = %ls\n", info.szCSDVersion);
printf("wServicePackMajor = %d\n", info.wServicePackMajor);
printf("wServicePackMinor = %d\n", info.wServicePackMinor);
printf("wSuiteMask = 0x%x\n", (unsigned int)info.wSuiteMask);
printf("wProductType = 0x%x\n", (unsigned int)info.wProductType);
return 0;
}
|