ERROR_IO_INCOMPLETE- This is an error code, which means that the Overlapped operation is still in progress; GetOverlappedResultreturns false because the operation has not yet been completed.
You have two options: lock and non-block:
: GetOverlappedResult :
BOOL fSuccess = GetOverlappedResult(data->hPipe, &data->oOverlap, &cbRet, TRUE);
, Overlapped ( ) .
:, , :
BOOL fSuccess = GetOverlappedResult(data->hPipe, &data->oOverlap, &cbRet, FALSE);
if (!fSuccess) {
if (GetLastError() == ERROR_IO_INCOMPLETE) return;
} else {
}
, , . , , , .)