diff options
Diffstat (limited to '')
| -rw-r--r-- | src/process.hpp | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/src/process.hpp b/src/process.hpp index c27dc3e..9ad93d9 100644 --- a/src/process.hpp +++ b/src/process.hpp @@ -5,36 +5,30 @@ #pragma once -#include "error.hpp" #include "cmd_line.hpp" +#include "error.hpp" #include <windows.h> #include <string> -namespace process -{ - inline HMODULE load_exe_module() - { - const auto module = GetModuleHandle(NULL); - if (module == NULL) - error::raise("GetModuleHandle"); - return module; - } +namespace process { - std::wstring get_executable_path(); - - inline std::wstring get_command_line() - { - return GetCommandLine(); - } +inline HMODULE load_exe_module() { + const auto module = GetModuleHandle(NULL); + if (module == NULL) + error::raise("GetModuleHandle"); + return module; +} - void runas( - const CommandLine& cmd_line, - HWND hwnd = NULL, - int nShow = SW_NORMAL); +std::wstring get_executable_path(); - void runas_self( - HWND hwnd = NULL, - int nShow = SW_NORMAL); +inline std::wstring get_command_line() { + return GetCommandLine(); } + +void runas(const CommandLine& cmd_line, HWND hwnd = NULL, int nShow = SW_NORMAL); + +void runas_self(HWND hwnd = NULL, int nShow = SW_NORMAL); + +} // namespace process |
