REG_LOAD_KEY_INFORMATION_V2 structure (wdm.h)

The REG_LOAD_KEY_INFORMATION_V2 structure contains information about a registry hive that is being loaded.

Syntax

typedef struct _REG_LOAD_KEY_INFORMATION_V2 {
  PVOID           Object;
  PUNICODE_STRING KeyName;
  PUNICODE_STRING SourceFile;
  ULONG           Flags;
  PVOID           TrustClassObject;
  PVOID           UserEvent;
  ACCESS_MASK     DesiredAccess;
  PHANDLE         RootHandle;
  PVOID           CallContext;
  PVOID           ObjectContext;
  ULONG_PTR       Version;
  PVOID           FileAccessToken;
} REG_LOAD_KEY_INFORMATION_V2, *PREG_LOAD_KEY_INFORMATION_V2;

Members

Object

A pointer to the registry key object for the root key of the hive that is about to be loaded.

KeyName

A pointer to a UNICODE_STRING structure that contains the name of the root key.

SourceFile

A pointer to a UNICODE_STRING structure that contains the path name of a file that contains the registry hive information that is being loaded.

Flags

Reserved for system use.

TrustClassObject

Reserved for system use.

UserEvent

A pointer to an event object that is signaled when the hive is unloaded.

DesiredAccess

The access mask that was specified by the thread that is trying to load the registry key. For more information about this access mask, see the description of the DesiredAccess parameter of the ZwCreateKey routine.

RootHandle

An optional pointer to a location that receives the handle to the root of the hive that is being loaded. This member can be non-NULL if an application hive is being loaded. In all other cases, this member should be NULL.

CallContext

Optional driver-defined context information that the driver's RegistryCallback routine can supply.

ObjectContext

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

Version

A pointer to a numeric version identifier of REG_LOAD_KEY_INFORMATION_*.

FileAccessToken

A pointer to an access token (PACCESS_TOKEN) that impersonates its access level when accessing a file (this for security purposes). In this case, it is used when accessing the hive file being loaded into the registry.

Requirements

Requirement Value
Minimum supported server Windows Server 2022
Header wdm.h (include Wdm.h)

See also

CmSetCallbackObjectContext

Filtering Registry Calls

RegLoadKey

RegistryCallback

REG_LOAD_KEY_INFORMATION

UNICODE_STRING

ZwCreateKey