Closed GoogleCodeExporter closed 9 years ago
I have to modify dispatchwrite function.
if ((fileObject->Flags & FO_SYNCHRONOUS_IO) &&
/*(irpSp->Parameters.Write.ByteOffset.QuadPart == 0 ||*/
((irpSp->Parameters.Write.ByteOffset.LowPart == FILE_USE_FILE_POINTER_POSITION)
&&
(irpSp->Parameters.Write.ByteOffset.HighPart == -1))) {
please comment this conditions.
Original comment by digerat...@gmail.com
on 16 Mar 2010 at 1:45
From:
http://msdn.microsoft.com/en-us/library/ms795960.aspx
===
IrpSp->Parameters.Write.ByteOffset
A pointer to a LARGE_INTEGER variable that specifies the starting byte offset
within the file of the
data to be written.
Under certain circumstances, this parameter might validly contain a NULL or
negative value. For
example:
If the following condition is true, this indicates that the current end of file
should be used instead
of an explicit file offset value:
IrpSp->Parameters.Write.ByteOffset.LowPart == FILE_WRITE_TO_END_OF_FILE and
IrpSp-
>Parameters.Write.ByteOffset.HighPart == -1
If the file object was opened for synchronous I/O, and one of the following
conditions is true, this
indicates that the current file position should be used instead of an explicit
file offset value:
IrpSp->Parameters.Write.ByteOffset.QuadPart == 0
IrpSp->Parameters.Write.ByteOffset.LowPart == FILE_USE_FILE_POINTER_POSITION
and IrpSp-
>Parameters.Write.ByteOffset.HighPart == -1
===
Is the document wrong?
Original comment by asa...@gmail.com
on 16 Mar 2010 at 8:21
Probably, setting CurrentByteOffset in DokanCompleteWrite is wrong, I fixed it
in both
dll and driver.
Original comment by asa...@gmail.com
on 16 Mar 2010 at 9:28
It seems the document is wrong. I removed
IrpSp->Parameters.Write.ByteOffset.QuadPart
== 0 check.
Original comment by asa...@gmail.com
on 17 Mar 2010 at 7:23
Original issue reported on code.google.com by
digerat...@gmail.com
on 8 Mar 2010 at 5:10