diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-09-16 01:08:49 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-09-16 01:08:49 +0300 |
commit | 42f1ad36ef93c98542f9899ada57bd55396a99f5 (patch) | |
tree | d0b10dd617764271db739b608a9d6bfaa63d516b /os.h | |
parent | make the 'Elevate' button smaller (diff) | |
download | privilege-check-42f1ad36ef93c98542f9899ada57bd55396a99f5.tar.gz privilege-check-42f1ad36ef93c98542f9899ada57bd55396a99f5.zip |
.hpp instead of .h for C++ headers
Diffstat (limited to 'os.h')
-rw-r--r-- | os.h | 30 |
1 files changed, 0 insertions, 30 deletions
@@ -1,30 +0,0 @@ -#pragma once - -#include "error.h" - -#include <Windows.h> - -namespace os -{ - OSVERSIONINFOW get_version_info() - { - OSVERSIONINFOW info; - ZeroMemory(&info, sizeof(info)); - info.dwOSVersionInfoSize = sizeof(info); - - if (!GetVersionExW(&info)) - error::raise("GetVersionExW"); - - return info; - } - - bool is_vista_or_later(const OSVERSIONINFOW& info) - { - return info.dwMajorVersion >= 6; - } - - bool is_vista_or_later() - { - return is_vista_or_later(get_version_info()); - } -} |