CcUninitializeCacheMap routine

The CcUninitializeCacheMap routine stops the caching of a cached file.

Syntax


BOOLEAN CcUninitializeCacheMap(
  _In_     PFILE_OBJECT              FileObject,
  _In_opt_ PLARGE_INTEGER            TruncateSize,
  _In_opt_ PCACHE_UNINITIALIZE_EVENT UninitializeCompleteEvent
);

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.

UninitializeCompleteEvent [in, optional]

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

Target platform

Universal

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

See also

CcInitializeCacheMap
CcPurgeCacheSection

 

 

Send comments about this topic to Microsoft

Show: