RE:[ntfsd] FltWriteFile return 0,but nothing is written

Thanks to your reply! i am a beginner of minifilter.after reread MSDN document?? i use NULL to replace ByteOffset in FltWriteFile function,because file is opende in synchronous I/O way.And the buffer i want to write into file is:PWCH tmpbf = NULL;size_t length = sizeof(L"123456789")tmpbf = (PWCH)FltAllocatePoolAlignedWithTag(FltObjects->Instance, PagedPool,length, ‘tmpb’);RtlCopyMemory(tmpbf, L"123456789", length);
I really have no idea where is wrong with my code.could you speak more specific??

You are doing paging IO.
The reasons for paging IO to complete with STATUS_SUCCESS without data transfer( i.e. no-op) are as follows ( in order of decreasing probability )

  • write beyond the end of file , paging IO doesn’t extend files
  • the offset and/or data size is not sector aligned and FSD opted to no-op instead of an error ( a strange design choice )
  • a file has valid data length less than starting offset for Paging IO write and FSD has no reason to extend it ( e.g. there were no mappings, no caching )
  • a file has never been written with cached IO and has never been mapped, in that case FSD can optimize out paging IO write as “spurious”
    The last two cases are common among remote file systems.

NTFSD is sponsored by OSR
MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:
To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:>