summaryrefslogtreecommitdiff
path: root/src/compat/compat-versionhelpers.h
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2017-06-22 13:16:46 +0200
committerAlberto Gonzalez Iniesta <agi@inittab.org>2017-06-22 13:16:46 +0200
commit766cdd4b4d1fcb31addf6727dbcfd3d99e390456 (patch)
tree76932876ae57f139fa1b3f82b375e4e526b507d7 /src/compat/compat-versionhelpers.h
parentd73f7253d939e293abf9e27b4b7f37df1ec12a39 (diff)
parent9683f890944ffb114f5f8214f694e0b339cf5a5a (diff)
Merge tag 'upstream/2.4.3'
Upstream version 2.4.3
Diffstat (limited to 'src/compat/compat-versionhelpers.h')
-rw-r--r--src/compat/compat-versionhelpers.h36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/compat/compat-versionhelpers.h b/src/compat/compat-versionhelpers.h
index a793056..251fb04 100644
--- a/src/compat/compat-versionhelpers.h
+++ b/src/compat/compat-versionhelpers.h
@@ -30,62 +30,74 @@ IsWindowsVersionOrGreater(WORD major, WORD minor, WORD servpack)
}
VERSIONHELPERAPI
-IsWindowsXPOrGreater(void) {
+IsWindowsXPOrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 0);
}
VERSIONHELPERAPI
-IsWindowsXPSP1OrGreater(void) {
+IsWindowsXPSP1OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 1);
}
VERSIONHELPERAPI
-IsWindowsXPSP2OrGreater(void) {
+IsWindowsXPSP2OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 2);
}
VERSIONHELPERAPI
-IsWindowsXPSP3OrGreater(void) {
+IsWindowsXPSP3OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 3);
}
VERSIONHELPERAPI
-IsWindowsVistaOrGreater(void) {
+IsWindowsVistaOrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0);
}
VERSIONHELPERAPI
-IsWindowsVistaSP1OrGreater(void) {
+IsWindowsVistaSP1OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 1);
}
VERSIONHELPERAPI
-IsWindowsVistaSP2OrGreater(void) {
+IsWindowsVistaSP2OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 2);
}
VERSIONHELPERAPI
-IsWindows7OrGreater(void) {
+IsWindows7OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 0);
}
VERSIONHELPERAPI
-IsWindows7SP1OrGreater(void) {
+IsWindows7SP1OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 1);
}
VERSIONHELPERAPI
-IsWindows8OrGreater(void) {
+IsWindows8OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN8), LOBYTE(_WIN32_WINNT_WIN8), 0);
}
VERSIONHELPERAPI
-IsWindows8Point1OrGreater(void) {
+IsWindows8Point1OrGreater(void)
+{
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINBLUE), LOBYTE(_WIN32_WINNT_WINBLUE), 0);
}
VERSIONHELPERAPI
-IsWindowsServer(void) {
+IsWindowsServer(void)
+{
OSVERSIONINFOEXW vi = {sizeof(vi),0,0,0,0,{0},0,0,0,VER_NT_WORKSTATION};
return !VerifyVersionInfoW(&vi, VER_PRODUCT_TYPE, VerSetConditionMask(0, VER_PRODUCT_TYPE, VER_EQUAL));
}