drop privileges if running elevated

make sure the Settings process is not running elevated otherwise the WebView control will fail to start
This commit is contained in:
Enrico Giordani
2019-10-03 18:42:18 +02:00
committed by Enrico Giordani
parent 25510b23e1
commit 298a8787d5
3 changed files with 75 additions and 2 deletions

View File

@@ -37,3 +37,9 @@ enum WindowState {
RESTORED
};
WindowState get_window_state(HWND hwnd);
// Returns true if the current process is running with elevated privileges
bool is_process_elevated();
// Drops the elevated privilages if present
bool drop_elevated_privileges();