Edit

Share via


CcRegisterExternalCacheEx function (ntifs.h)

The CcRegisterExternalCacheEx routine registers an external cache with the cache manager.

Syntax

NTSTATUS CcRegisterExternalCacheEx(
  PFILE_OBJECT                FileObject,
  PEXTERNAL_CACHE_CALLBACK_EX Callback,
  PVOID                       *ExternalCacheContext
);

Parameters

FileObject

[in] Pointer to a file object. FileObject is used to identify the volume associated with the external cache being registered.

Callback

[in] A caller-implemented PEXTERNAL_CACHE_CALLBACK_EX callback routine that the cache manager will call on every lazy write scan.

ExternalCacheContext

[out] Pointer to the context that identifies the external cache instance.

Return value

CcRegisterExternalCacheEx returns STATUS_SUCCESS if the external cache is successfully registered. Otherwise, it returns an appropriate error code, such as one of the following:

Return code Description
STATUS_NOT_SUPPORTED The cache manager's per-volume lazywriter isn't enabled. In this case, the caller is expected to fall back on traditional cache management.

Remarks

CcRegisterExternalCacheEx is the entry point for file systems (clients) to request registration of an external cache with the cache manager. The cache manager allocates an internal structure to represent this instance and add the callback routine provided by the caller. Cache manager will call the callback on every lazy write scan.

Requirements

Requirement Value
Minimum supported client Windows 11, version 24H2
Header ntifs.h

See also

CcUpdateExternalCacheInfoEx

CcUnregisterExternalCacheEx