mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 00:27:17 -04:00
windows: add GetOverlappedResult function for async I/O
We already have all the structs and constants for async I/O, and the various functions of x/sys/windows take the right parameters. But we're missing the final step of any ordinary async I/O routine: getting the result of overlapped I/O. Without this, the rest of the plumbing supported by this module isn't actually so useful. So add this small oversight. Change-Id: I0ce1a71bce06bc81a83f3b0ca10ad9c4b67af726 Reviewed-on: https://go-review.googlesource.com/c/sys/+/168521 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Alex Brainman
parent
f7bb7a8bee
commit
f49334f85d
@@ -137,6 +137,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW
|
||||
//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
|
||||
//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
|
||||
//sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error)
|
||||
//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]
|
||||
//sys CloseHandle(handle Handle) (err error)
|
||||
//sys GetStdHandle(stdhandle uint32) (handle Handle, err error) [failretval==InvalidHandle]
|
||||
|
||||
Reference in New Issue
Block a user