Skip to content

Commit cc9327a

Browse files
committed
windows: fix signature of GetFinalPathNameByHandle
The function name should be GetFinalPathNameByHandle, not GetFinalPathNameByHandleW, and it should take types in windows, not in syscall. This was merged so recently that I think we can just fix it up here. Updates golang/go#41686 Fixes CL 264577 Change-Id: Ib84df5b5a9c2df5ad4344884874afa152e9ca554 Reviewed-on: https://go-review.googlesource.com/c/sys/+/270459 Trust: Jason A. Donenfeld <[email protected]> Trust: Alex Brainman <[email protected]> Run-TryBot: Jason A. Donenfeld <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Alex Brainman <[email protected]>
1 parent 3a5be02 commit cc9327a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

windows/syscall_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
244244
//sys GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW
245245
//sys GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW
246246
//sys GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW
247+
//sys GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW
247248
//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW
248249
//sys MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error)
249250
//sys UnmapViewOfFile(addr uintptr) (err error)
@@ -352,7 +353,6 @@ func NewCallbackCDecl(fn interface{}) uintptr {
352353
//sys getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetThreadPreferredUILanguages
353354
//sys getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetUserPreferredUILanguages
354355
//sys getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetSystemPreferredUILanguages
355-
//sys GetFinalPathNameByHandleW(file syscall.Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW
356356

357357
// Process Status API (PSAPI)
358358
//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses

windows/zsyscall_windows.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)