Skip to content

Commit

Permalink
add 1.1 windows missing fMask (#14)
Browse files Browse the repository at this point in the history
Signed-off-by: 21pages <pages21@163.com>
  • Loading branch information
21pages committed Feb 17, 2024
1 parent 8be6716 commit 4f587c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/impl_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use windows_sys::Win32::System::Com::{
use windows_sys::Win32::System::Threading::GetExitCodeProcess;
use windows_sys::Win32::System::Threading::WaitForSingleObject;
use windows_sys::Win32::System::Threading::INFINITE;
use windows_sys::Win32::UI::Shell::SEE_MASK_NOASYNC;
use windows_sys::Win32::UI::Shell::SEE_MASK_NOCLOSEPROCESS;
use windows_sys::Win32::UI::Shell::{ShellExecuteExW, SHELLEXECUTEINFOW};
use windows_sys::Win32::UI::WindowsAndMessaging::{SW_HIDE, SW_NORMAL};

Expand All @@ -26,6 +28,7 @@ unsafe fn win_runas(cmd: *const c_ushort, args: *const c_ushort, show: bool) ->
COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE,
);

sei.fMask = SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS;
sei.cbSize = mem::size_of::<SHELLEXECUTEINFOW>() as _;
sei.lpVerb = verb.as_ptr();
sei.lpFile = cmd;
Expand Down

0 comments on commit 4f587c8

Please sign in to comment.