Members

Optional driver-defined context information that the driver's RegistryCallback routine can supply. This member is defined starting with Windows Vista.

Object

A pointer to a registry key object. This object represents the root key of the hive that is being unloaded.

ObjectContext

A pointer to driver-defined context information that the driver has associated with a registry object by calling CmSetCallbackObjectContext. This member is defined starting with Windows Vista.

Reserved

This member is reserved for future use. This member is defined starting with Windows Vista.

UserEvent

A pointer to an event object.

Remarks

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

The operating system passes the REG_UNLOAD_KEY_INFORMATION structure to the RegistryCallback routine every time a thread attempts to unload a key—for example, when a user-mode thread calls the RegUnloadKey function. In response to a RegNtPreUnloadKey notification, the RegistryCallback routine should free any resources the driver previously allocated for use with the hive before the hive is unloaded.