| 44 | } |
| 45 | |
| 46 | bool IsWindowsVersionAtLeast(DWORD major, DWORD minor, DWORD build) { |
| 47 | WindowsVersion current = {}; |
| 48 | if (!GetWindowsVersion(current)) { |
| 49 | return false; |
| 50 | } |
| 51 | |
| 52 | if (current.major != major) { |
| 53 | return current.major > major; |
| 54 | } |
| 55 | if (current.minor != minor) { |
| 56 | return current.minor > minor; |
| 57 | } |
| 58 | return current.build >= build; |
| 59 | } |
| 60 | |
| 61 | bool IsWindows10BuildOrGreater(DWORD build) { |
| 62 | return IsWindowsVersionAtLeast(10, 0, build); |
no test coverage detected