// ntifs.h
VOID CcFlushCache(
[in] PSECTION_OBJECT_POINTERS SectionObjectPointer,
[in, optional] PLARGE_INTEGER FileOffset,
[in] ULONG Length,
[out, optional] PIO_STATUS_BLOCK IoStatus
);
View the official Windows Driver Kit DDI reference
No description available.
The CcFlushCache routine flushes all or a portion of a cached file to disk.
SectionObjectPointer
[in]Pointer to a SECTION_OBJECT_POINTERS structure containing the file object's section object pointers.
FileOffset
[in, optional]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
[in]Length of the byte range to flush, starting at FileOffset. If FileOffset is NULL, Length is ignored.
IoStatus
[out, optional]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.