installed pty
[VSoRC/.git] / node_modules / node-pty / deps / winpty / misc / OSVersion.cc
1 #include <windows.h>
2
3 #include <assert.h>
4 #include <locale.h>
5 #include <stdio.h>
6
7 #include <iostream>
8
9 int main() {
10     setlocale(LC_ALL, "");
11
12     OSVERSIONINFOEXW info = {0};
13     info.dwOSVersionInfoSize = sizeof(info);
14     assert(GetVersionExW((OSVERSIONINFOW*)&info));
15
16     printf("dwMajorVersion      = %d\n", (int)info.dwMajorVersion);
17     printf("dwMinorVersion      = %d\n", (int)info.dwMinorVersion);
18     printf("dwBuildNumber       = %d\n", (int)info.dwBuildNumber);
19     printf("dwPlatformId        = %d\n", (int)info.dwPlatformId);
20     printf("szCSDVersion        = %ls\n", info.szCSDVersion);
21     printf("wServicePackMajor   = %d\n", info.wServicePackMajor);
22     printf("wServicePackMinor   = %d\n", info.wServicePackMinor);
23     printf("wSuiteMask          = 0x%x\n", (unsigned int)info.wSuiteMask);
24     printf("wProductType        = 0x%x\n", (unsigned int)info.wProductType);
25
26     return 0;
27 }