Ignore:
Timestamp:
Sep 13, 2023, 10:49:50 AM (21 months ago)
Author:
Izuru Yakumo
Message:

Ready to release 0.6.0

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/vendor/golang.org/x/sys/windows/zsyscall_windows.go

    r67 r69  
    4141        modcrypt32  = NewLazySystemDLL("crypt32.dll")
    4242        moddnsapi   = NewLazySystemDLL("dnsapi.dll")
     43        moddwmapi   = NewLazySystemDLL("dwmapi.dll")
    4344        modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
    4445        modkernel32 = NewLazySystemDLL("kernel32.dll")
     
    176177        procDnsQuery_W                                           = moddnsapi.NewProc("DnsQuery_W")
    177178        procDnsRecordListFree                                    = moddnsapi.NewProc("DnsRecordListFree")
     179        procDwmGetWindowAttribute                                = moddwmapi.NewProc("DwmGetWindowAttribute")
     180        procDwmSetWindowAttribute                                = moddwmapi.NewProc("DwmSetWindowAttribute")
    178181        procGetAdaptersAddresses                                 = modiphlpapi.NewProc("GetAdaptersAddresses")
    179182        procGetAdaptersInfo                                      = modiphlpapi.NewProc("GetAdaptersInfo")
     
    409412        procGetModuleFileNameExW                                 = modpsapi.NewProc("GetModuleFileNameExW")
    410413        procGetModuleInformation                                 = modpsapi.NewProc("GetModuleInformation")
     414        procQueryWorkingSetEx                                    = modpsapi.NewProc("QueryWorkingSetEx")
    411415        procSubscribeServiceChangeNotifications                  = modsechost.NewProc("SubscribeServiceChangeNotifications")
    412416        procUnsubscribeServiceChangeNotifications                = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
     
    444448        procSHGetKnownFolderPath                                 = modshell32.NewProc("SHGetKnownFolderPath")
    445449        procShellExecuteW                                        = modshell32.NewProc("ShellExecuteW")
     450        procEnumChildWindows                                     = moduser32.NewProc("EnumChildWindows")
     451        procEnumWindows                                          = moduser32.NewProc("EnumWindows")
    446452        procExitWindowsEx                                        = moduser32.NewProc("ExitWindowsEx")
     453        procGetClassNameW                                        = moduser32.NewProc("GetClassNameW")
     454        procGetDesktopWindow                                     = moduser32.NewProc("GetDesktopWindow")
     455        procGetForegroundWindow                                  = moduser32.NewProc("GetForegroundWindow")
     456        procGetGUIThreadInfo                                     = moduser32.NewProc("GetGUIThreadInfo")
    447457        procGetShellWindow                                       = moduser32.NewProc("GetShellWindow")
    448458        procGetWindowThreadProcessId                             = moduser32.NewProc("GetWindowThreadProcessId")
     459        procIsWindow                                             = moduser32.NewProc("IsWindow")
     460        procIsWindowUnicode                                      = moduser32.NewProc("IsWindowUnicode")
     461        procIsWindowVisible                                      = moduser32.NewProc("IsWindowVisible")
    449462        procMessageBoxW                                          = moduser32.NewProc("MessageBoxW")
    450463        procCreateEnvironmentBlock                               = moduserenv.NewProc("CreateEnvironmentBlock")
     
    15251538}
    15261539
     1540func 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
     1548func 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
    15271556func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
    15281557        r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
     
    35053534}
    35063535
     3536func 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
    35073544func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
    35083545        ret = procSubscribeServiceChangeNotifications.Find()
     
    37943831}
    37953832
     3833func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) {
     3834        syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param))
     3835        return
     3836}
     3837
     3838func 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
    37963846func ExitWindowsEx(flags uint32, reason uint32) (err error) {
    37973847        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
     3854func 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
     3863func GetDesktopWindow() (hwnd HWND) {
     3864        r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0)
     3865        hwnd = HWND(r0)
     3866        return
     3867}
     3868
     3869func GetForegroundWindow() (hwnd HWND) {
     3870        r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0)
     3871        hwnd = HWND(r0)
     3872        return
     3873}
     3874
     3875func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
     3876        r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0)
    37983877        if r1 == 0 {
    37993878                err = errnoErr(e1)
     
    38143893                err = errnoErr(e1)
    38153894        }
     3895        return
     3896}
     3897
     3898func IsWindow(hwnd HWND) (isWindow bool) {
     3899        r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0)
     3900        isWindow = r0 != 0
     3901        return
     3902}
     3903
     3904func IsWindowUnicode(hwnd HWND) (isUnicode bool) {
     3905        r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0)
     3906        isUnicode = r0 != 0
     3907        return
     3908}
     3909
     3910func IsWindowVisible(hwnd HWND) (isVisible bool) {
     3911        r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0)
     3912        isVisible = r0 != 0
    38163913        return
    38173914}
Note: See TracChangeset for help on using the changeset viewer.