NTFSD Folk:
My mini-filter driver has had this code for a long time to append to a file:
LARGE_INTEGER EndOfFile;
EndOfFile.QuadPart = -1LL;
status = FltWriteFile(
RepositoryInstance, // Instance
foOut, // File Object
&EndOfFile, // ByteOffset (-1 = append to end of file)
iBytes, // Length
pCopyOfRecords, // Buffer
0, // Flags
NULL, // BytesWritten
NULL, // CallbackRoutine
NULL ); // CallbackContext
It has always worked fine, but on Vista it is getting STATUS_INVALID_PARAMETER_3 (“An invalid parameter was passed to a service or
function as the third argument.”)
That seems to indicate that it doesn’t like -1 for the byte offset. I get the same results if I open the file with GENERIC_WRITE or
FILE_APPEND_WRITE.
Anybody else noticed this in Vista? Any workaround?
Ken