fix: PWSTR type for QueryFullProcessImageNameW
This commit is contained in:
parent
cd1388a02b
commit
15e177087b
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ mod win_impl {
|
|||
// Fallback: QueryFullProcessImageNameW (works for elevated processes)
|
||||
let mut buf2 = [0u16; 1024];
|
||||
let mut size = buf2.len() as u32;
|
||||
let ok = QueryFullProcessImageNameW(handle, PROCESS_NAME_FORMAT(0), &mut buf2, &mut size);
|
||||
let ok = QueryFullProcessImageNameW(handle, PROCESS_NAME_FORMAT(0), windows::core::PWSTR(buf2.as_mut_ptr()), &mut size);
|
||||
let _ = windows::Win32::Foundation::CloseHandle(handle);
|
||||
if ok.is_ok() && size > 0 {
|
||||
let full_path = String::from_utf16_lossy(&buf2[..size as usize]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue