1
Fork 0
hermetic_cc_toolchain/test/windows/main.c

17 lines
413 B
C
Raw Normal View History

2022-05-29 19:35:18 +03:00
#include <stdio.h>
#include <windows.h>
int main() {
DWORD version = GetVersion();
DWORD majorVersion = (DWORD)(LOBYTE(LOWORD(version)));
DWORD minorVersion = (DWORD)(HIBYTE(LOWORD(version)));
DWORD build = 0;
if (version < 0x80000000) {
build = (DWORD)(HIWORD(version));
}
printf("Running Windows version %d.%d (%d).\n", majorVersion, minorVersion, build);
return 0;
}