mirror of
https://github.com/reactos/wine.git
synced 2024-12-04 01:41:18 +00:00
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:
parent
84ae4b937f
commit
72f3fa9e2d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user