Create windows_version.c

This commit is contained in:
janbodnar 2016-01-31 13:55:47 +01:00
parent 5a86f58aaf
commit 2ccdd2c87c

24
system/windows_version.c Normal file
View File

@ -0,0 +1,24 @@
#include <windows.h>
#include <wchar.h>
#include <VersionHelpers.h>
int wmain(void) {
//if (IsWindows10OrGreater()) {
// wprintf(L"This is Windows 10+");
// }
if (IsWindows8Point1OrGreater()) {
wprintf(L"This is Windows 8.1+\n");
} else if (IsWindows8OrGreater()) {
wprintf(L"This is Windows 8\n");
} else if (IsWindows7OrGreater ()) {
wprintf(L"This is Windows 7\n");
} else if (IsWindowsVistaOrGreater ()) {
wprintf(L"This is Windows Vista\n");
} else if (IsWindowsXPOrGreater()) {
wprintf(L"This is Windows XP\n");
}
return 0;
}