aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/os.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-10-14 00:00:22 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-10-14 00:00:22 +0300
commit69905917cf2c46fa0093df7323e5326450d1246b (patch)
tree2ec12ee6f588f7bcefab713c976ed64aa1e729ec /src/os.hpp
parentrename the project (diff)
downloadprivilege-check-69905917cf2c46fa0093df7323e5326450d1246b.tar.gz
privilege-check-69905917cf2c46fa0093df7323e5326450d1246b.zip
move code from headers to .cpp files
Diffstat (limited to '')
-rw-r--r--src/os.hpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/os.hpp b/src/os.hpp
index 7aeaf54..c9a89a1 100644
--- a/src/os.hpp
+++ b/src/os.hpp
@@ -11,24 +11,14 @@
namespace os
{
- OSVERSIONINFOW get_version_info()
- {
- OSVERSIONINFOW info;
- ZeroMemory(&info, sizeof(info));
- info.dwOSVersionInfoSize = sizeof(info);
-
- if (!GetVersionExW(&info))
- error::raise("GetVersionExW");
-
- return info;
- }
+ OSVERSIONINFOW get_version_info();
- bool is_vista_or_later(const OSVERSIONINFOW& info)
+ inline bool is_vista_or_later(const OSVERSIONINFOW& info)
{
return info.dwMajorVersion >= 6;
}
- bool is_vista_or_later()
+ inline bool is_vista_or_later()
{
return is_vista_or_later(get_version_info());
}