CcUninitializeCacheMap function (ntifs.h)

The CcUninitializeCacheMap routine stops the caching of a cached file.

Syntax

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

Parameters

[in] FileObject

Pointer to a file object for the cached file.

[in, optional] TruncateSize

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.

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe

See also

CcInitializeCacheMap

CcPurgeCacheSection