Dmitry Timoshkov <dmi...@baikal.ru> writes: > @@ -961,16 +961,23 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, > > if (type == FD_TYPE_FILE) > { > + off_t off; > + > if (!(options & (FILE_SYNCHRONOUS_IO_ALERT | > FILE_SYNCHRONOUS_IO_NONALERT)) && !offset) > { > status = STATUS_INVALID_PARAMETER; > goto done; > } > > - if (offset && offset->QuadPart != (LONGLONG)-2 /* > FILE_USE_FILE_POINTER_POSITION */) > + off = offset ? offset->QuadPart : (off_t)-2 /* > FILE_USE_FILE_POINTER_POSITION */; > + > + if (off == (off_t)-1 /* FILE_WRITE_TO_END_OF_FILE */) > + off = lseek( unix_handle, 0, SEEK_END );
You are not supposed to change the position for the asynchronous case. -- Alexandre Julliard julli...@winehq.org