CmRegisterCallbackEx routine
The CmRegisterCallbackEx routine registers a RegistryCallback routine.
Syntax
NTSTATUS CmRegisterCallbackEx( _In_ PEX_CALLBACK_FUNCTION Function, _In_ PCUNICODE_STRING Altitude, _In_ PVOID Driver, _In_opt_ PVOID Context, _Out_ PLARGE_INTEGER Cookie, _Reserved_ PVOID Reserved );
Parameters
- Function [in]
-
A pointer to the RegistryCallback routine to register.
- Altitude [in]
-
A pointer to a UNICODE_STRING structure. This structure must contain a string that represents the altitude of the calling minifilter driver. For more information, see Remarks.
- Driver [in]
-
A pointer to the DRIVER_OBJECT structure that represents the driver.
- 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.
- Reserved
-
This parameter is reserved for future use.
Return value
CmRegisterCallbackEx returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following NTSTATUS values:
| Return code | Description |
|---|---|
|
The calling driver or another driver has already registered a RegistryCallback routine for the specified altitude. |
|
An attempt to allocate memory failed. |
Remarks
The CmRegisterCallbackEx routine is available on Windows Vista and later versions of Windows.
A driver can call CmRegisterCallback or CmRegisterCallbackEx to register a RegistryCallback routine, which is called every time a thread performs an operation on the registry.
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. To request an altitude for your minifilter driver, visit the WHDC Minifilter Altitude Allocation website.
Call CmUnRegisterCallback to unregister a callback routine that CmRegisterCallbackEx registered.
For more information about CmRegisterCallbackEx and filtering registry operations, see Filtering Registry Calls.
Requirements
|
Version | Available in Windows Vista and later versions of Windows. |
|---|---|
|
Header |
|
|
Library |
|
|
IRQL | <=APC_LEVEL |
|
DDI compliance rules | IrqlExApcLte2, HwStorPortProhibitedDDIs |
See also
Send comments about this topic to Microsoft
Build date: 5/22/2013
