Changeset 69 in code for trunk/vendor/golang.org/x/sys/windows/zsyscall_windows.go
- Timestamp:
- Sep 13, 2023, 10:49:50 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/vendor/golang.org/x/sys/windows/zsyscall_windows.go
r67 r69 41 41 modcrypt32 = NewLazySystemDLL("crypt32.dll") 42 42 moddnsapi = NewLazySystemDLL("dnsapi.dll") 43 moddwmapi = NewLazySystemDLL("dwmapi.dll") 43 44 modiphlpapi = NewLazySystemDLL("iphlpapi.dll") 44 45 modkernel32 = NewLazySystemDLL("kernel32.dll") … … 176 177 procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W") 177 178 procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree") 179 procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute") 180 procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute") 178 181 procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses") 179 182 procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") … … 409 412 procGetModuleFileNameExW = modpsapi.NewProc("GetModuleFileNameExW") 410 413 procGetModuleInformation = modpsapi.NewProc("GetModuleInformation") 414 procQueryWorkingSetEx = modpsapi.NewProc("QueryWorkingSetEx") 411 415 procSubscribeServiceChangeNotifications = modsechost.NewProc("SubscribeServiceChangeNotifications") 412 416 procUnsubscribeServiceChangeNotifications = modsechost.NewProc("UnsubscribeServiceChangeNotifications") … … 444 448 procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath") 445 449 procShellExecuteW = modshell32.NewProc("ShellExecuteW") 450 procEnumChildWindows = moduser32.NewProc("EnumChildWindows") 451 procEnumWindows = moduser32.NewProc("EnumWindows") 446 452 procExitWindowsEx = moduser32.NewProc("ExitWindowsEx") 453 procGetClassNameW = moduser32.NewProc("GetClassNameW") 454 procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow") 455 procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow") 456 procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo") 447 457 procGetShellWindow = moduser32.NewProc("GetShellWindow") 448 458 procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId") 459 procIsWindow = moduser32.NewProc("IsWindow") 460 procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode") 461 procIsWindowVisible = moduser32.NewProc("IsWindowVisible") 449 462 procMessageBoxW = moduser32.NewProc("MessageBoxW") 450 463 procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock") … … 1525 1538 } 1526 1539 1540 func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) { 1541 r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0) 1542 if r0 != 0 { 1543 ret = syscall.Errno(r0) 1544 } 1545 return 1546 } 1547 1548 func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) { 1549 r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0) 1550 if r0 != 0 { 1551 ret = syscall.Errno(r0) 1552 } 1553 return 1554 } 1555 1527 1556 func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) { 1528 1557 r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0) … … 3505 3534 } 3506 3535 3536 func QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) { 3537 r1, _, e1 := syscall.Syscall(procQueryWorkingSetEx.Addr(), 3, uintptr(process), uintptr(pv), uintptr(cb)) 3538 if r1 == 0 { 3539 err = errnoErr(e1) 3540 } 3541 return 3542 } 3543 3507 3544 func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) { 3508 3545 ret = procSubscribeServiceChangeNotifications.Find() … … 3794 3831 } 3795 3832 3833 func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) { 3834 syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param)) 3835 return 3836 } 3837 3838 func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) { 3839 r1, _, e1 := syscall.Syscall(procEnumWindows.Addr(), 2, uintptr(enumFunc), uintptr(param), 0) 3840 if r1 == 0 { 3841 err = errnoErr(e1) 3842 } 3843 return 3844 } 3845 3796 3846 func ExitWindowsEx(flags uint32, reason uint32) (err error) { 3797 3847 r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0) 3848 if r1 == 0 { 3849 err = errnoErr(e1) 3850 } 3851 return 3852 } 3853 3854 func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) { 3855 r0, _, e1 := syscall.Syscall(procGetClassNameW.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount)) 3856 copied = int32(r0) 3857 if copied == 0 { 3858 err = errnoErr(e1) 3859 } 3860 return 3861 } 3862 3863 func GetDesktopWindow() (hwnd HWND) { 3864 r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0) 3865 hwnd = HWND(r0) 3866 return 3867 } 3868 3869 func GetForegroundWindow() (hwnd HWND) { 3870 r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0) 3871 hwnd = HWND(r0) 3872 return 3873 } 3874 3875 func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) { 3876 r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0) 3798 3877 if r1 == 0 { 3799 3878 err = errnoErr(e1) … … 3814 3893 err = errnoErr(e1) 3815 3894 } 3895 return 3896 } 3897 3898 func IsWindow(hwnd HWND) (isWindow bool) { 3899 r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0) 3900 isWindow = r0 != 0 3901 return 3902 } 3903 3904 func IsWindowUnicode(hwnd HWND) (isUnicode bool) { 3905 r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0) 3906 isUnicode = r0 != 0 3907 return 3908 } 3909 3910 func IsWindowVisible(hwnd HWND) (isVisible bool) { 3911 r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0) 3912 isVisible = r0 != 0 3816 3913 return 3817 3914 }
Note:
See TracChangeset
for help on using the changeset viewer.