diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-05-18 20:05:45 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-05-18 20:05:45 +0300 |
commit | 81ed0ac8c29fa38bb85168a6825bcdf646f5b690 (patch) | |
tree | 3197bb04be85f370e056d90d76f6b922ae9d9b23 | |
parent | 2b5e7da3faecae94fd65f89535e362367a24f501 (diff) |
Add a new helper function to check for a specific Windows 10 build
-rw-r--r-- | common/DSUtilLite/DShowUtil.cpp | 11 | ||||
-rw-r--r-- | common/DSUtilLite/DShowUtil.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/common/DSUtilLite/DShowUtil.cpp b/common/DSUtilLite/DShowUtil.cpp index 82b39b00..6381b8d8 100644 --- a/common/DSUtilLite/DShowUtil.cpp +++ b/common/DSUtilLite/DShowUtil.cpp @@ -764,6 +764,17 @@ BOOL IsWindows10OrNewer() return (os.dwMajorVersion >= 10); } +BOOL IsWindows10BuildOrNewer(DWORD dwBuild) +{ + // Query OS version info + OSVERSIONINFO os; + ZeroMemory(&os, sizeof(os)); + os.dwOSVersionInfoSize = sizeof(os); + GetVersionEx(&os); + + return (os.dwMajorVersion > 10 || (os.dwMajorVersion == 10 && os.dwBuildNumber >= dwBuild)); +} + void __cdecl debugprintf(LPCWSTR format, ...) { WCHAR buf[4096], *p = buf; diff --git a/common/DSUtilLite/DShowUtil.h b/common/DSUtilLite/DShowUtil.h index fb6b08c3..2a01c9c8 100644 --- a/common/DSUtilLite/DShowUtil.h +++ b/common/DSUtilLite/DShowUtil.h @@ -140,4 +140,5 @@ BOOL IsVistaOrNewer(); BOOL IsWindows7OrNewer(); BOOL IsWindows8OrNewer(); BOOL IsWindows10OrNewer(); +BOOL IsWindows10BuildOrNewer(DWORD dwBuild); void __cdecl debugprintf(LPCWSTR format, ...); |