Commit 23103ad9 authored by Amos Wenger's avatar Amos Wenger

Add ShowWindow syscall

parent 78365f06
Pipeline #11878 passed with stage
in 29 seconds
......@@ -13,6 +13,7 @@ var (
procEnumWindows = moduser32.NewProc("EnumWindows")
procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
procSetForegroundWindow = moduser32.NewProc("SetForegroundWindow")
procShowWindow = moduser32.NewProc("ShowWindow")
)
func EnumWindows(
......@@ -69,3 +70,24 @@ func SetForegroundWindow(
}
return
}
func ShowWindow(
hwnd syscall.Handle,
flags int,
) (err error) {
r1, _, e1 := syscall.Syscall(
procShowWindow.Addr(),
1,
uintptr(hwnd),
uintptr(flags),
0,
)
if r1 == 0 {
if e1 != 0 {
err = e1
} else {
err = syscall.EINVAL
}
}
return
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment