Files
navi/cmd/vpnapp/msgbox_windows.go

17 lines
376 B
Go

//go:build windows
package main
import (
"syscall"
"unsafe"
)
func messageBox(text string) {
user32 := syscall.NewLazyDLL("user32.dll")
proc := user32.NewProc("MessageBoxW")
title, _ := syscall.UTF16PtrFromString("Navis")
body, _ := syscall.UTF16PtrFromString(text)
proc.Call(0, uintptr(unsafe.Pointer(body)), uintptr(unsafe.Pointer(title)), 0x10) // MB_ICONERROR
}