diff options
| author | 2023-09-11 09:50:37 +0000 | |
|---|---|---|
| committer | 2023-09-11 09:50:37 +0000 | |
| commit | f0a3fcae856db66b71850e1aa35269f689b8931c (patch) | |
| tree | b208105e7902b2e85dd9af4397e77c288610433f /vendor/golang.org/x/sys/windows | |
| parent | [docs] add fail2ban regex in the doc (#2189) (diff) | |
| download | gotosocial-f0a3fcae856db66b71850e1aa35269f689b8931c.tar.xz | |
[chore]: Bump golang.org/x/crypto from 0.12.0 to 0.13.0 (#2190)
Diffstat (limited to 'vendor/golang.org/x/sys/windows')
| -rw-r--r-- | vendor/golang.org/x/sys/windows/syscall_windows.go | 11 | ||||
| -rw-r--r-- | vendor/golang.org/x/sys/windows/zsyscall_windows.go | 26 | 
2 files changed, 31 insertions, 6 deletions
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 373d16388..67bad0926 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -216,7 +216,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {  //sys	shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath  //sys	TerminateProcess(handle Handle, exitcode uint32) (err error)  //sys	GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) -//sys	GetStartupInfo(startupInfo *StartupInfo) (err error) = GetStartupInfoW +//sys	getStartupInfo(startupInfo *StartupInfo) = GetStartupInfoW  //sys	GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error)  //sys	DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error)  //sys	WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff] @@ -437,6 +437,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {  //sys	DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute  //sys	DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute +// Windows Multimedia API +//sys TimeBeginPeriod (period uint32) (err error) [failretval != 0] = winmm.timeBeginPeriod +//sys TimeEndPeriod (period uint32) (err error) [failretval != 0] = winmm.timeEndPeriod +  // syscall interface implementation for other packages  // GetCurrentProcess returns the handle for the current process. @@ -1624,6 +1628,11 @@ func SetConsoleCursorPosition(console Handle, position Coord) error {  	return setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position))))  } +func GetStartupInfo(startupInfo *StartupInfo) error { +	getStartupInfo(startupInfo) +	return nil +} +  func (s NTStatus) Errno() syscall.Errno {  	return rtlNtStatusToDosErrorNoTeb(s)  } diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 566dd3e31..5c385580f 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -55,6 +55,7 @@ var (  	moduser32   = NewLazySystemDLL("user32.dll")  	moduserenv  = NewLazySystemDLL("userenv.dll")  	modversion  = NewLazySystemDLL("version.dll") +	modwinmm    = NewLazySystemDLL("winmm.dll")  	modwintrust = NewLazySystemDLL("wintrust.dll")  	modws2_32   = NewLazySystemDLL("ws2_32.dll")  	modwtsapi32 = NewLazySystemDLL("wtsapi32.dll") @@ -468,6 +469,8 @@ var (  	procGetFileVersionInfoSizeW                              = modversion.NewProc("GetFileVersionInfoSizeW")  	procGetFileVersionInfoW                                  = modversion.NewProc("GetFileVersionInfoW")  	procVerQueryValueW                                       = modversion.NewProc("VerQueryValueW") +	proctimeBeginPeriod                                      = modwinmm.NewProc("timeBeginPeriod") +	proctimeEndPeriod                                        = modwinmm.NewProc("timeEndPeriod")  	procWinVerifyTrustEx                                     = modwintrust.NewProc("WinVerifyTrustEx")  	procFreeAddrInfoW                                        = modws2_32.NewProc("FreeAddrInfoW")  	procGetAddrInfoW                                         = modws2_32.NewProc("GetAddrInfoW") @@ -2367,11 +2370,8 @@ func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uin  	return  } -func GetStartupInfo(startupInfo *StartupInfo) (err error) { -	r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0) -	if r1 == 0 { -		err = errnoErr(e1) -	} +func getStartupInfo(startupInfo *StartupInfo) { +	syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)  	return  } @@ -4017,6 +4017,22 @@ func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPoint  	return  } +func TimeBeginPeriod(period uint32) (err error) { +	r1, _, e1 := syscall.Syscall(proctimeBeginPeriod.Addr(), 1, uintptr(period), 0, 0) +	if r1 != 0 { +		err = errnoErr(e1) +	} +	return +} + +func TimeEndPeriod(period uint32) (err error) { +	r1, _, e1 := syscall.Syscall(proctimeEndPeriod.Addr(), 1, uintptr(period), 0, 0) +	if r1 != 0 { +		err = errnoErr(e1) +	} +	return +} +  func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {  	r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))  	if r0 != 0 {  | 
