From bd3116f43658fdd4ac145693e8ff4576061f22fa Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 20 Oct 2016 03:20:49 +0300 Subject: refactoring --- src/process.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/process.hpp') 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 @@ -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() -- cgit v1.2.3