kernel32: Don't initialize Information of passed OVERLAPPED struct in WriteFile.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-01-23 15:52:05 +01:00 committed by Alexandre Julliard
parent 84ae4b937f
commit 72f3fa9e2d
2 changed files with 9 additions and 1 deletions

View File

@ -565,8 +565,8 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
piosb = (PIO_STATUS_BLOCK)overlapped;
if (((ULONG_PTR)hEvent & 1) == 0) cvalue = overlapped;
}
else piosb->Information = 0;
piosb->u.Status = STATUS_PENDING;
piosb->Information = 0;
status = NtWriteFile(hFile, hEvent, NULL, cvalue, piosb,
buffer, bytesToWrite, poffset, NULL);

View File

@ -757,6 +757,14 @@ static void test_ReadFile(void)
ok(overlapped.Internal == STATUS_PENDING, "Internal = %lx\n", overlapped.Internal);
ok(overlapped.InternalHigh == 0xdeadbeef, "InternalHigh = %lx\n", overlapped.InternalHigh);
memset(&overlapped, 0, sizeof(overlapped));
overlapped.InternalHigh = 0xdeadbeef;
res = WriteFile(server, buf, 1, &size, &overlapped);
ok(!res && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "ReadFile returned %x(%u)\n", res, GetLastError());
ok(size == 0, "size = %u\n", size);
ok(overlapped.Internal == STATUS_PENDING, "Internal = %lx\n", overlapped.Internal);
ok(overlapped.InternalHigh == 0xdeadbeef, "InternalHigh = %lx\n", overlapped.InternalHigh);
CloseHandle(server);
CloseHandle(client);
}