CmRegisterCallback - NtDoc

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

NTSTATUS CmRegisterCallback(
  [in]           PEX_CALLBACK_FUNCTION Function,
  [in, optional] PVOID                 Context,
  [out]          PLARGE_INTEGER        Cookie
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-cmregistercallback)

CmRegisterCallback function

Description

The CmRegisterCallback routine is obsolete for Windows Vista and later operating system versions. Use CmRegisterCallbackEx instead.

The CmRegisterCallback routine registers a RegistryCallback routine.

Parameters

Function [in]

A pointer to the RegistryCallback routine to register.

Context [in, optional]

A driver-defined value that the configuration manager will pass as the CallbackContext parameter to the RegistryCallback routine

Cookie [out]

A pointer to a LARGE_INTEGER variable that receives the value that identifies the callback routine. When you unregister the callback routine, pass this value as the Cookie parameter to CmUnRegisterCallback.

Return value

CmRegisterCallback returns STATUS_SUCCESS if the operation succeeds or the appropriate NTSTATUS error code if it fails.

Remarks

The CmRegisterCallback routine is available on Windows XP and later operating system versions. For Windows Vista and later operating system versions, you should use CmRegisterCallbackEx instead.

A driver calls CmRegisterCallback to register a RegistryCallback routine, which is called every time a thread performs an operation on the registry.

Call CmUnRegisterCallback to unregister a callback routine that CmRegisterCallback registered.

For more information about CmRegisterCallback and filtering registry operations, see Filtering Registry Calls.

See also

CmRegisterCallbackEx

CmUnRegisterCallback

RegistryCallback