GetOverlappedResultEx function kernel32
Retrieves the results of an overlapped operation on the specified file, named pipe, or communications device within the specified time-out interval.
The calling thread can perform an alertable wait.
To learn more, see learn.microsoft.com/windows/win32/api/ioapiset/nf-ioapiset-getoverlappedresultex.
Implementation
Win32Result<bool> GetOverlappedResultEx(
HANDLE hFile,
Pointer<OVERLAPPED> lpOverlapped,
Pointer<Uint32> lpNumberOfBytesTransferred,
int dwMilliseconds,
bool bAlertable,
) {
final result_ = GetOverlappedResultEx_Wrapper(
hFile,
lpOverlapped,
lpNumberOfBytesTransferred,
dwMilliseconds,
bAlertable ? TRUE : FALSE,
);
return .new(value: result_.value.i32 != FALSE, error: result_.error);
}