diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-20 03:20:49 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-10-20 03:20:49 +0300 |
commit | bd3116f43658fdd4ac145693e8ff4576061f22fa (patch) | |
tree | 93f0d7f0084a26b8db9de201323192a7711fbb0b /src/process.hpp | |
parent | code style & compiler warnings fixes (diff) | |
download | privilege-check-bd3116f43658fdd4ac145693e8ff4576061f22fa.tar.gz privilege-check-bd3116f43658fdd4ac145693e8ff4576061f22fa.zip |
refactoring
Diffstat (limited to '')
-rw-r--r-- | src/process.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/process.hpp b/src/process.hpp index c422aac..53fcdf8 100644 --- a/src/process.hpp +++ b/src/process.hpp @@ -5,6 +5,7 @@ #pragma once +#include "error.hpp" #include "cmd_line.hpp" #include <Windows.h> @@ -13,6 +14,14 @@ namespace process { + inline HMODULE load_exe_module() + { + const auto module = GetModuleHandle(NULL); + if (module == NULL) + error::raise("GetModuleHandle"); + return module; + } + std::wstring get_executable_path(); inline std::wstring get_command_line() |