CcUninitializeCacheMap - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntifs.h

BOOLEAN CcUninitializeCacheMap(
  [in]           PFILE_OBJECT              FileObject,
  [in, optional] PLARGE_INTEGER            TruncateSize,
                 PCACHE_UNINITIALIZE_EVENT UninitializeEvent
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntifs-ccuninitializecachemap)

CcUninitializeCacheMap function

Description

The CcUninitializeCacheMap routine stops the caching of a cached file.

Parameters

FileObject [in]

Pointer to a file object for the cached file.

TruncateSize [in, optional]

If specified, the file was truncated to the specified size, and the cache should be purged accordingly.

UninitializeEvent

If specified, the provided event is set to the signaled state when the cached file data has been flushed to disk.

Return value

CcUninitializeCacheMap returns TRUE if caching was stopped successfully, FALSE otherwise.

Remarks

All file systems that support file caching must call CcUninitializeCacheMap when closing a file, whether the file is cached or not. Even if the file was created with caching disabled, the file system still must call CcUninitializeCacheMap.

To cache a file, use CcInitializeCacheMap.

See also

CcInitializeCacheMap

CcPurgeCacheSection