Commit ff5ecfd8 authored by Filip Navara's avatar Filip Navara Committed by Alexandre Julliard

For non-overlapped writes the lpNumberOfBytesWritten parameter of

WriteFile mustn't be NULL.
parent d660a634
......@@ -3222,14 +3222,19 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetLibFlags(ICreateTypeLib2 * iface, UIN
static int ctl2_write_chunk(HANDLE hFile, void *segment, int length)
{
if (!WriteFile(hFile, segment, length, NULL, 0)) {CloseHandle(hFile); return 0;}
DWORD dwWritten;
if (!WriteFile(hFile, segment, length, &dwWritten, 0)) {
CloseHandle(hFile);
return 0;
}
return -1;
}
static int ctl2_write_segment(ICreateTypeLib2Impl *This, HANDLE hFile, int segment)
{
DWORD dwWritten;
if (!WriteFile(hFile, This->typelib_segment_data[segment],
This->typelib_segdir[segment].length, NULL, 0)) {
This->typelib_segdir[segment].length, &dwWritten, 0)) {
CloseHandle(hFile);
return 0;
}
......
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