mirror of
https://github.com/janbodnar/Windows-API-examples.git
synced 2024-11-14 15:55:30 +00:00
Create windows_version.c
This commit is contained in:
parent
5a86f58aaf
commit
2ccdd2c87c
24
system/windows_version.c
Normal file
24
system/windows_version.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user