fix: compile errors - GetWindowLongA, Win32_System_ProcessStatus feature

This commit is contained in:
Helios 2026-03-06 02:11:20 +01:00
parent 450604bbbd
commit 8a873e4923
No known key found for this signature in database
GPG key ID: C8259547CD8309B5
2 changed files with 3 additions and 2 deletions

View file

@ -40,4 +40,5 @@ windows = { version = "0.54", features = [
"Win32_UI_WindowsAndMessaging",
"Win32_UI_Shell",
"Win32_System_Console",
"Win32_System_ProcessStatus",
] }

View file

@ -8,7 +8,7 @@ mod win_impl {
use super::*;
use windows::Win32::Foundation::{BOOL, HWND, LPARAM};
use windows::Win32::UI::WindowsAndMessaging::{
BringWindowToTop, EnumWindows, GetWindowLong, GetWindowTextW, IsIconic,
BringWindowToTop, EnumWindows, GetWindowLongA, GetWindowTextW, IsIconic,
IsWindowVisible, SetForegroundWindow, ShowWindow, GWL_EXSTYLE,
SW_MAXIMIZE, SW_MINIMIZE, SW_RESTORE, WS_EX_TOOLWINDOW,
};
@ -109,7 +109,7 @@ mod win_impl {
}
// Exclude tool windows (WS_EX_TOOLWINDOW)
let ex_style = unsafe { GetWindowLong(hwnd, GWL_EXSTYLE) } as u32;
let ex_style = unsafe { GetWindowLongA(hwnd, GWL_EXSTYLE) } as u32;
if ex_style & WS_EX_TOOLWINDOW.0 != 0 {
return true;
}