Skip to content

Commit

Permalink
fix: fetch process name with less privileges
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Sep 16, 2024
1 parent 5b5f68b commit ff90dd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/wm/src/common/platform/native_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use windows::{
},
System::Threading::{
OpenProcess, QueryFullProcessImageNameW, PROCESS_NAME_WIN32,
PROCESS_QUERY_INFORMATION,
PROCESS_QUERY_LIMITED_INFORMATION,
},
UI::{
Input::KeyboardAndMouse::{
Expand Down Expand Up @@ -104,7 +104,7 @@ impl NativeWindow {
}

let process_handle = unsafe {
OpenProcess(PROCESS_QUERY_INFORMATION, false, process_id)
OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, false, process_id)
}?;

let mut buffer = [0u16; 256];
Expand Down

0 comments on commit ff90dd3

Please sign in to comment.