Update go dependencies (#4524)
This commit is contained in:
parent
2ba1a9e71a
commit
341d64b652
412 changed files with 43034 additions and 34165 deletions
18
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
18
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
|
|
@ -294,7 +294,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
|||
//sys clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) = ole32.CLSIDFromString
|
||||
//sys stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) = ole32.StringFromGUID2
|
||||
//sys coCreateGuid(pguid *GUID) (ret error) = ole32.CoCreateGuid
|
||||
//sys coTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree
|
||||
//sys CoTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree
|
||||
//sys rtlGetVersion(info *OsVersionInfoEx) (ret error) = ntdll.RtlGetVersion
|
||||
|
||||
// syscall interface implementation for other packages
|
||||
|
||||
|
|
@ -1301,6 +1302,19 @@ func (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, e
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer coTaskMemFree(unsafe.Pointer(p))
|
||||
defer CoTaskMemFree(unsafe.Pointer(p))
|
||||
return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:]), nil
|
||||
}
|
||||
|
||||
// RtlGetVersion returns the true version of the underlying operating system, ignoring
|
||||
// any manifesting or compatibility layers on top of the win32 layer.
|
||||
func RtlGetVersion() *OsVersionInfoEx {
|
||||
info := &OsVersionInfoEx{}
|
||||
info.osVersionInfoSize = uint32(unsafe.Sizeof(*info))
|
||||
// According to documentation, this function always succeeds.
|
||||
// The function doesn't even check the validity of the
|
||||
// osVersionInfoSize member. Disassembling ntdll.dll indicates
|
||||
// that the documentation is indeed correct about that.
|
||||
_ = rtlGetVersion(info)
|
||||
return info
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue