Commit 60cba999 authored by Martin Wilck's avatar Martin Wilck Committed by Alexandre Julliard

Fixed some problems with asynchronous file IO.

parent 4941a3af
......@@ -152,7 +152,7 @@ static void CALLBACK fileio_call_completion_func (ULONG_PTR data)
async_fileio *ovp = (async_fileio*) data;
TRACE ("data: %p\n", ovp);
ovp->completion_func( ovp->lpOverlapped->Internal,
ovp->completion_func( RtlNtStatusToDosError ( ovp->lpOverlapped->Internal ),
ovp->lpOverlapped->InternalHigh,
ovp->lpOverlapped );
......@@ -1697,6 +1697,11 @@ static void FILE_AsyncReadService(async_private *ovp)
r = FILE_GetNtStatus ();
goto async_end;
}
else if ( result == 0 )
{
r = ( lpOverlapped->InternalHigh ? STATUS_SUCCESS : STATUS_END_OF_FILE );
goto async_end;
}
lpOverlapped->InternalHigh += result;
TRACE("read %d more bytes %ld/%d so far\n",result,lpOverlapped->InternalHigh,fileio->count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment