mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
fix: set title
This commit is contained in:
parent
ba0e471a19
commit
41f0b11469
@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
@ -19,6 +20,9 @@ var (
|
|||||||
procSetConsoleTitle = modkernel32.NewProc("SetConsoleTitle")
|
procSetConsoleTitle = modkernel32.NewProc("SetConsoleTitle")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//go:linkname golang.org/x/sys/windows.errnoErr errnoErr
|
||||||
|
func errnoErr(e syscall.Errno) error
|
||||||
|
|
||||||
func setConsoleTitle(title string) (err error) {
|
func setConsoleTitle(title string) (err error) {
|
||||||
var p0 *uint16
|
var p0 *uint16
|
||||||
p0, err = syscall.UTF16PtrFromString(title)
|
p0, err = syscall.UTF16PtrFromString(title)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user