| 1512 | } |
| 1513 | |
| 1514 | bool BrowserFactory::IsWindowsVersionOrGreater(unsigned short major_version, |
| 1515 | unsigned short minor_version, |
| 1516 | unsigned short service_pack) { |
| 1517 | OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0,{ 0 }, 0, 0 }; |
| 1518 | DWORDLONG const dwlConditionMask = VerSetConditionMask( |
| 1519 | VerSetConditionMask( |
| 1520 | VerSetConditionMask( |
| 1521 | 0, VER_MAJORVERSION, VER_GREATER_EQUAL), |
| 1522 | VER_MINORVERSION, VER_GREATER_EQUAL), |
| 1523 | VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL); |
| 1524 | |
| 1525 | osvi.dwMajorVersion = major_version; |
| 1526 | osvi.dwMinorVersion = minor_version; |
| 1527 | osvi.wServicePackMajor = service_pack; |
| 1528 | |
| 1529 | return VerifyVersionInfoW(&osvi, |
| 1530 | VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, |
| 1531 | dwlConditionMask) != FALSE; |
| 1532 | } |
| 1533 | |
| 1534 | bool BrowserFactory::IsWindowsVistaOrGreater() { |
| 1535 | return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0); |
nothing calls this directly
no outgoing calls
no test coverage detected