mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 08:37:31 -04:00
windows: CreateFile's templatefile parameter has always been a HANDLE
This fixes a bug in the declaration. The documentation involving this parameter is at: https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilew Change-Id: I650c54b3110d29921627b08d47be4fa41d60bbf4 Reviewed-on: https://go-review.googlesource.com/c/sys/+/175159 Run-TryBot: Jason Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Benny Siegert <bsiegert@gmail.com>
This commit is contained in:
committed by
Benny Siegert
parent
a43fa875dd
commit
ca7f33d411
@@ -611,7 +611,7 @@ func ExitProcess(exitcode uint32) {
|
||||
return
|
||||
}
|
||||
|
||||
func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) {
|
||||
func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) {
|
||||
r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
|
||||
handle = Handle(r0)
|
||||
if handle == InvalidHandle {
|
||||
|
||||
Reference in New Issue
Block a user