kernel32: Always set bytes written in WriteFile.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c47c74e5d3
commit
84ae4b937f
|
@ -577,8 +577,8 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
|
|||
status = piosb->u.Status;
|
||||
}
|
||||
|
||||
if (status != STATUS_PENDING && bytesWritten)
|
||||
*bytesWritten = piosb->Information;
|
||||
if (bytesWritten)
|
||||
*bytesWritten = overlapped && status ? 0 : piosb->Information;
|
||||
|
||||
if (status && status != STATUS_TIMEOUT)
|
||||
{
|
||||
|
|
|
@ -2767,7 +2767,7 @@ static void _overlapped_write_async(unsigned line, HANDLE writer, void *buf, DWO
|
|||
overlapped->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
|
||||
res = WriteFile(writer, buf, size, &written_bytes, overlapped);
|
||||
ok_(__FILE__,line)(!res && GetLastError() == ERROR_IO_PENDING, "WriteFile returned %x(%u)\n", res, GetLastError());
|
||||
todo_wine ok_(__FILE__,line)(!written_bytes, "written_bytes = %u\n", written_bytes);
|
||||
ok_(__FILE__,line)(!written_bytes, "written_bytes = %u\n", written_bytes);
|
||||
|
||||
_test_not_signaled(line, overlapped->hEvent);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue