CmUnRegisterCallback function (wdm.h)
The CmUnRegisterCallback routine unregisters a RegistryCallback routine that a CmRegisterCallback or CmRegisterCallbackEx routine previously registered.
Syntax
NTSTATUS CmUnRegisterCallback(
[in] LARGE_INTEGER Cookie
);
Parameters
[in] 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.
A driver must not call CmUnRegisterCallback 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
Requirement | Value |
---|---|
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 | HwStorPortProhibitedDDIs(storport), IrqlExApcLte2(wdm) |