5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-05 04:50:09 +08:00
wails/v2/internal/system/system_windows.go

16 lines
284 B
Go

// +build windows
package system
import (
"fmt"
"syscall"
)
func (i *Info) discover() {
dll := syscall.MustLoadDLL("kernel32.dll")
p := dll.MustFindProc("GetVersion")
v, _, _ := p.Call()
fmt.Printf("Windows version %d.%d (Build %d)\n", byte(v), uint8(v>>8), uint16(v>>16))
}