Skip to content

Commit

Permalink
add IsWindows2000OrGreater function
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Sep 29, 2024
1 parent c479cc2 commit 158b49e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions inc/versionhelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ VERSIONHELPERAPI IsWindowsVersionAnySP(DWORD major, DWORD minor, DWORD build)
VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL));
}

VERSIONHELPERAPI IsWindows2000OrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN2K), LOBYTE(_WIN32_WINNT_WIN2K), 0, 0);
}

VERSIONHELPERAPI IsWindowsXPOrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 0, 0);
}
Expand Down Expand Up @@ -136,6 +140,10 @@ VERSIONHELPERAPI IsWindowsServer(void) {
return !verhelp_verify_version(&vi, VER_PRODUCT_TYPE, verhelp_set_mask(0, VER_PRODUCT_TYPE, VER_EQUAL));
}

VERSIONHELPERAPI IsWindows2000(void) {
return IsWindowsVersionAnySP(HIBYTE(_WIN32_WINNT_WIN2K), LOBYTE(_WIN32_WINNT_WIN2K), 0);
}

VERSIONHELPERAPI IsWindowsXP(void) {
return IsWindowsVersionAnySP(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 0);
}
Expand Down

0 comments on commit 158b49e

Please sign in to comment.