The CcFlushCache routine flushes all or a portion of a cached file to disk.
NTKERNELAPI VOID CcFlushCache( PSECTION_OBJECT_POINTERS SectionObjectPointer, PLARGE_INTEGER FileOffset, ULONG Length, PIO_STATUS_BLOCK IoStatus );
Pointer to a SECTION_OBJECT_POINTERS structure containing the file object's section object pointers.
Pointer to a variable that specifies the starting byte offset within the cached file where the data is to be flushed.
If FileOffset is NULL, the entire file is flushed from the cache.
If FileOffset is not NULL, only the byte range specified by FileOffset and Length is flushed.
Length of the byte range to flush, starting at FileOffset. If FileOffset is NULL, Length is ignored.
Pointer to a structure that receives the final completion status and information about the flush operation. If the data is flushed successfully, IoStatus.Status contains STATUS_SUCCESS. If not all of the data is flushed successfully, IoStatus.Information contains the actual number of bytes that were flushed. Otherwise, IoStatus.Information contains the value given in Length.
CcFlushCache has no Wait parameter. Thus the caller must be able to enter a wait state until all the data has been flushed.
To cache a file, use CcInitializeCacheMap.
|Header||ntifs.h (include Ntifs.h)|