Files
HackBrowserData/internal/winapi/console_windows.go
T
Roger 49747bf0ce refactor: move crypto and key retrieval under internal/ (#652)
Crypto stays free of OS calls, so every secret-store read sits behind one masterkey contract.
The macOS v10 retriever reads one run-scoped login keychain handle that Safari will share.
2026-10-27 13:19:45 +08:00

22 lines
488 B
Go

//go:build windows
package winapi
var (
procGetConsoleWindow = Kernel32.NewProc("GetConsoleWindow")
procShowWindow = User32.NewProc("ShowWindow")
)
const swHide = 0
// HideConsoleWindow hides the console window attached to the current
// process. Returns true if the window was previously visible.
func HideConsoleWindow() bool {
hwnd, _, _ := procGetConsoleWindow.Call()
if hwnd == 0 {
return false
}
prev, _, _ := procShowWindow.Call(hwnd, swHide)
return prev != 0
}