server
This commit is contained in:
22
pkg/tools/windows/windows_windows.go
Normal file
22
pkg/tools/windows/windows_windows.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package windows
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
NULL = 0
|
||||
MB_OK = 0
|
||||
)
|
||||
|
||||
// MessageBox of Win32 API.
|
||||
func MessageBox(hwnd uintptr, caption, title string, flags uint) int {
|
||||
ret, _, _ := syscall.NewLazyDLL("user32.dll").NewProc("MessageBoxW").Call(
|
||||
uintptr(hwnd),
|
||||
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(caption))),
|
||||
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(title))),
|
||||
uintptr(flags))
|
||||
|
||||
return int(ret)
|
||||
}
|
||||
Reference in New Issue
Block a user