Avoid segfault with overlapped WriteFile() calls.

This commit is contained in:
Martin Wilck 2002-04-23 19:27:51 +00:00 committed by Alexandre Julliard
parent 55f9b75163
commit ef79c38e76

View File

@ -1740,9 +1740,9 @@ static BOOL FILE_WriteFileEx(HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
goto error;
}
ovp->async.ops = &fileio_async_ops;
ovp->async.ops = ( lpCompletionRoutine ? &fileio_async_ops : &fileio_nocomp_async_ops );
ovp->async.handle = hFile;
ovp->async.fd = FILE_GetUnixHandle( hFile, GENERIC_WRITE );
ovp->async.fd = fd;
ovp->async.type = ASYNC_TYPE_WRITE;
ovp->async.func = FILE_AsyncWriteService;
ovp->lpOverlapped = overlapped;