Commit 72f3fa9e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent 84ae4b93
......@@ -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);
......
......@@ -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);
}
......
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