REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION structure (wdm.h)

The REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION structure contains information that a driver's RegistryCallback routine can use to free resources that the driver previously allocated for the context that is associated with a registry object.

Syntax

typedef struct _REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION {
  PVOID Object;
  PVOID ObjectContext;
  PVOID Reserved;
} REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION, *PREG_CALLBACK_CONTEXT_CLEANUP_INFORMATION;

Members

Object

A pointer to the registry key object for the key to be deleted.

ObjectContext

A pointer to driver-defined context information that the driver has associated with a registry object by calling CmSetCallbackObjectContext.

Reserved

This member is reserved for future use.

Remarks

This structure is used by the RegistryCallback routine. When the Argument1 parameter to the RegistryCallback routine is RegNtCallbackObjectContextCleanup, the Argument2 parameter is a pointer to a REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION structure.

The driver's RegistryCallback routine will receive a RegNtCallbackObjectContextCleanup notification when the key object's reference count drops to zero (i.e. there are no outstanding handles or pointer references to the key object).

In response to this notification, the routine should release any resources that it allocated for the object's context. The RegNtCallbackObjectContextCleanup notification occurs when the driver has called CmUnRegisterCallback or the driver's RegistryCallback routine has just finished processing a RegNtPreKeyHandleClose notification.

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

Requirements

Requirement Value
Minimum supported client Available starting with Windows Vista.
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)

See also

CmSetCallbackObjectContext

CmUnRegisterCallback

RegistryCallback