Upgrade versions of vendored libs
This commit is contained in:
124
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
124
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
@@ -40,6 +40,7 @@ var (
|
||||
modadvapi32 = NewLazySystemDLL("advapi32.dll")
|
||||
modcrypt32 = NewLazySystemDLL("crypt32.dll")
|
||||
moddnsapi = NewLazySystemDLL("dnsapi.dll")
|
||||
moddwmapi = NewLazySystemDLL("dwmapi.dll")
|
||||
modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
|
||||
modkernel32 = NewLazySystemDLL("kernel32.dll")
|
||||
modmswsock = NewLazySystemDLL("mswsock.dll")
|
||||
@@ -175,8 +176,11 @@ var (
|
||||
procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
|
||||
procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
|
||||
procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
|
||||
procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
|
||||
procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
|
||||
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
|
||||
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
|
||||
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
|
||||
procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
|
||||
procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
|
||||
procCancelIo = modkernel32.NewProc("CancelIo")
|
||||
@@ -226,6 +230,7 @@ var (
|
||||
procFreeLibrary = modkernel32.NewProc("FreeLibrary")
|
||||
procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
|
||||
procGetACP = modkernel32.NewProc("GetACP")
|
||||
procGetActiveProcessorCount = modkernel32.NewProc("GetActiveProcessorCount")
|
||||
procGetCommTimeouts = modkernel32.NewProc("GetCommTimeouts")
|
||||
procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
|
||||
procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
|
||||
@@ -251,6 +256,7 @@ var (
|
||||
procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
|
||||
procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
|
||||
procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
|
||||
procGetMaximumProcessorCount = modkernel32.NewProc("GetMaximumProcessorCount")
|
||||
procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW")
|
||||
procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW")
|
||||
procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
|
||||
@@ -405,6 +411,7 @@ var (
|
||||
procGetModuleBaseNameW = modpsapi.NewProc("GetModuleBaseNameW")
|
||||
procGetModuleFileNameExW = modpsapi.NewProc("GetModuleFileNameExW")
|
||||
procGetModuleInformation = modpsapi.NewProc("GetModuleInformation")
|
||||
procQueryWorkingSetEx = modpsapi.NewProc("QueryWorkingSetEx")
|
||||
procSubscribeServiceChangeNotifications = modsechost.NewProc("SubscribeServiceChangeNotifications")
|
||||
procUnsubscribeServiceChangeNotifications = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
|
||||
procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
|
||||
@@ -440,9 +447,18 @@ var (
|
||||
procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
|
||||
procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
|
||||
procShellExecuteW = modshell32.NewProc("ShellExecuteW")
|
||||
procEnumChildWindows = moduser32.NewProc("EnumChildWindows")
|
||||
procEnumWindows = moduser32.NewProc("EnumWindows")
|
||||
procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
|
||||
procGetClassNameW = moduser32.NewProc("GetClassNameW")
|
||||
procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow")
|
||||
procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow")
|
||||
procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo")
|
||||
procGetShellWindow = moduser32.NewProc("GetShellWindow")
|
||||
procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
|
||||
procIsWindow = moduser32.NewProc("IsWindow")
|
||||
procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode")
|
||||
procIsWindowVisible = moduser32.NewProc("IsWindowVisible")
|
||||
procMessageBoxW = moduser32.NewProc("MessageBoxW")
|
||||
procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
|
||||
procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
|
||||
@@ -1521,6 +1537,22 @@ func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
|
||||
return
|
||||
}
|
||||
|
||||
func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
|
||||
r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
|
||||
if r0 != 0 {
|
||||
ret = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
|
||||
r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
|
||||
if r0 != 0 {
|
||||
ret = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
|
||||
r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
|
||||
if r0 != 0 {
|
||||
@@ -1537,6 +1569,14 @@ func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
|
||||
return
|
||||
}
|
||||
|
||||
func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) {
|
||||
r0, _, _ := syscall.Syscall(procGetBestInterfaceEx.Addr(), 2, uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)), 0)
|
||||
if r0 != 0 {
|
||||
errcode = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
|
||||
r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
|
||||
if r0 != 0 {
|
||||
@@ -1967,6 +2007,12 @@ func GetACP() (acp uint32) {
|
||||
return
|
||||
}
|
||||
|
||||
func GetActiveProcessorCount(groupNumber uint16) (ret uint32) {
|
||||
r0, _, _ := syscall.Syscall(procGetActiveProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
|
||||
ret = uint32(r0)
|
||||
return
|
||||
}
|
||||
|
||||
func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
|
||||
if r1 == 0 {
|
||||
@@ -2169,6 +2215,12 @@ func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err er
|
||||
return
|
||||
}
|
||||
|
||||
func GetMaximumProcessorCount(groupNumber uint16) (ret uint32) {
|
||||
r0, _, _ := syscall.Syscall(procGetMaximumProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
|
||||
ret = uint32(r0)
|
||||
return
|
||||
}
|
||||
|
||||
func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
|
||||
n = uint32(r0)
|
||||
@@ -2747,7 +2799,7 @@ func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree
|
||||
return
|
||||
}
|
||||
|
||||
func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
|
||||
func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
|
||||
var _p0 *byte
|
||||
if len(buf) > 0 {
|
||||
_p0 = &buf[0]
|
||||
@@ -3189,7 +3241,7 @@ func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32,
|
||||
return
|
||||
}
|
||||
|
||||
func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
|
||||
func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
|
||||
var _p0 *byte
|
||||
if len(buf) > 0 {
|
||||
_p0 = &buf[0]
|
||||
@@ -3481,6 +3533,14 @@ func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb
|
||||
return
|
||||
}
|
||||
|
||||
func QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procQueryWorkingSetEx.Addr(), 3, uintptr(process), uintptr(pv), uintptr(cb))
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
|
||||
ret = procSubscribeServiceChangeNotifications.Find()
|
||||
if ret != nil {
|
||||
@@ -3770,6 +3830,19 @@ func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *ui
|
||||
return
|
||||
}
|
||||
|
||||
func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) {
|
||||
syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param))
|
||||
return
|
||||
}
|
||||
|
||||
func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procEnumWindows.Addr(), 2, uintptr(enumFunc), uintptr(param), 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func ExitWindowsEx(flags uint32, reason uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
|
||||
if r1 == 0 {
|
||||
@@ -3778,6 +3851,35 @@ func ExitWindowsEx(flags uint32, reason uint32) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procGetClassNameW.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount))
|
||||
copied = int32(r0)
|
||||
if copied == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetDesktopWindow() (hwnd HWND) {
|
||||
r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0)
|
||||
hwnd = HWND(r0)
|
||||
return
|
||||
}
|
||||
|
||||
func GetForegroundWindow() (hwnd HWND) {
|
||||
r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0)
|
||||
hwnd = HWND(r0)
|
||||
return
|
||||
}
|
||||
|
||||
func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetShellWindow() (shellWindow HWND) {
|
||||
r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
|
||||
shellWindow = HWND(r0)
|
||||
@@ -3793,6 +3895,24 @@ func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func IsWindow(hwnd HWND) (isWindow bool) {
|
||||
r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0)
|
||||
isWindow = r0 != 0
|
||||
return
|
||||
}
|
||||
|
||||
func IsWindowUnicode(hwnd HWND) (isUnicode bool) {
|
||||
r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0)
|
||||
isUnicode = r0 != 0
|
||||
return
|
||||
}
|
||||
|
||||
func IsWindowVisible(hwnd HWND) (isVisible bool) {
|
||||
r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0)
|
||||
isVisible = r0 != 0
|
||||
return
|
||||
}
|
||||
|
||||
func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
|
||||
r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
|
||||
ret = int32(r0)
|
||||
|
||||
Reference in New Issue
Block a user