5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 20:21:01 +08:00
wails/v2/init_windows.go
2021-06-21 09:58:10 +10:00

16 lines
300 B
Go

package wails
import (
"fmt"
"syscall"
)
// Init is called at the start of the application
func Init() error {
status, r, err := syscall.NewLazyDLL("user32.dll").NewProc("SetProcessDPIAware").Call()
if status == 0 {
return fmt.Errorf("exit status %d: %v %v", status, r, err)
}
return nil
}