The CmRegisterCallbackEx routine registers a RegistryCallback routine.
NTSTATUS CmRegisterCallbackEx( PEX_CALLBACK_FUNCTION Function, PCUNICODE_STRING Altitude, PVOID Driver, PVOID Context, PLARGE_INTEGER Cookie, PVOID Reserved );
A pointer to the RegistryCallback routine to register.
A pointer to the DRIVER_OBJECT structure that represents the driver.
A driver-defined value that the configuration manager will pass as the CallbackContext parameter to the RegistryCallback routine.
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.
This parameter is reserved for future use.
CmRegisterCallbackEx returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following NTSTATUS values:
||The calling driver or another driver has already registered a RegistryCallback routine for the specified altitude.|
||An attempt to allocate memory failed.|
The CmRegisterCallbackEx routine is available starting with Windows Vista.
The Altitude parameter defines the position of the minifilter driver relative to other minifilters in the I/O stack when the minifilter is loaded. Allocation of altitudes to minifilters is managed by Microsoft. For more information about altitudes, see Load Order Groups and Altitudes for Minifilter Drivers.
Call CmUnRegisterCallback to unregister a callback routine that CmRegisterCallbackEx registered.
For more information about CmRegisterCallbackEx and filtering registry operations, see Filtering Registry Calls.
|Minimum supported client||Available starting with Windows Vista.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
|DDI compliance rules||IrqlExApcLte2, HwStorPortProhibitedDDIs|
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.