Fixed some problems with asynchronous file IO.

This commit is contained in:
Martin Wilck 2002-11-30 01:48:32 +00:00 committed by Alexandre Julliard
parent 4941a3aff2
commit 60cba9999c
1 changed files with 6 additions and 1 deletions

View File

@ -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);