aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/process.hpp
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-13 00:36:59 +0200
committerEgor Tensin <egor@tensin.name>2026-06-13 00:39:55 +0200
commit190ff781eaee33e7a61aab44fc4133718cc0515b (patch)
tree469cedfc87734589a4e9a0102f69324b9edb8f16 /src/process.hpp
parentcmake: upgrade minimum version (diff)
downloadprivilege-check-190ff781eaee33e7a61aab44fc4133718cc0515b.tar.gz
privilege-check-190ff781eaee33e7a61aab44fc4133718cc0515b.zip
add .clang-format
Diffstat (limited to '')
-rw-r--r--src/process.hpp40
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