CmUnRegisterCallback function

The CmUnRegisterCallback routine unregisters a RegistryCallback routine that a CmRegisterCallback or CmRegisterCallbackEx routine previously registered.

Syntax

NTSTATUS CmUnRegisterCallback(
  LARGE_INTEGER Cookie
);

Parameters

Cookie

A LARGE_INTEGER value that identifies the callback routine to unregister. CmRegisterCallback provided this value when you registered the callback routine.

Return Value

CmUnRegisterCallback returns STATUS_SUCCESS if it succeeds or the appropriate NTSTATUS error code if it fails. If the Cookie parameter does not match any registered callback routines, CmUnRegisterCallback returns STATUS_INVALID_PARAMETER.

Remarks

A driver that calls CmRegisterCallback or CmRegisterCallbackEx should call CmUnRegisterCallback before the driver is unloaded.

Note  A driver must not call CmRegisterCallback from its implementation of the RegistryCallback routine. That call will result in a deadlock.
 
For more information about CmUnRegisterCallback and filtering registry operations, see Filtering Registry Calls.

Requirements

   
Minimum supported client Available in Windows XP and later versions of Windows.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL
DDI compliance rules IrqlExApcLte2, HwStorPortProhibitedDDIs

See Also

CmRegisterCallback

CmRegisterCallbackEx

RegistryCallback