aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/os.h
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-09-16 01:08:49 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-09-16 01:08:49 +0300
commit42f1ad36ef93c98542f9899ada57bd55396a99f5 (patch)
treed0b10dd617764271db739b608a9d6bfaa63d516b /os.h
parentmake the 'Elevate' button smaller (diff)
downloadprivilege-check-42f1ad36ef93c98542f9899ada57bd55396a99f5.tar.gz
privilege-check-42f1ad36ef93c98542f9899ada57bd55396a99f5.zip
.hpp instead of .h for C++ headers
Diffstat (limited to 'os.h')
-rw-r--r--os.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/os.h b/os.h
deleted file mode 100644
index e4ba71c..0000000
--- a/os.h
+++ /dev/null
@@ -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());
- }
-}