REG_CREATE_KEY_INFORMATION structure

The REG_CREATE_KEY_INFORMATION structure contains information that a driver's RegistryCallback routine can use when a registry key that is being created.

Note  Starting with Windows 7, the V1 version of this structure, REG_CREATE_KEY_INFORMATION_V1, is used instead.
 

Syntax


typedef struct _REG_CREATE_KEY_INFORMATION {
  PUNICODE_STRING CompleteName;
  PVOID           RootObject;
  PVOID           ObjectType;
  ULONG           CreateOptions;
  PUNICODE_STRING Class;
  PVOID           SecurityDescriptor;
  PVOID           SecurityQualityOfService;
  ACCESS_MASK     DesiredAccess;
  ACCESS_MASK     GrantedAccess;
  PULONG          Disposition;
  PVOID           *ResultObject;
  PVOID           CallContext;
  PVOID           RootObjectContext;
  PVOID           Transaction;
  PVOID           Reserved;
} REG_CREATE_KEY_INFORMATION, REG_OPEN_KEY_INFORMATION, *PREG_CREATE_KEY_INFORMATION, *PREG_OPEN_KEY_INFORMATION;

Members

CompleteName

A pointer to a UNICODE_STRING structure that contains the path of the new registry key. The path can be absolute or relative. If the path is absolute, this structure contains a fully qualified path that starts with the "\" character. For an absolute path, the RootObject member specifies the \REGISTRY key, which is the root directory of the registry tree. If the path is relative, the path starts with a character other than "\", and is relative to the key that is specified by the RootObject member.

RootObject

Pointer to the registry key object that serves as the root for the path specified by the CompleteName member.

ObjectType

The ObjectType member is reserved for internal use. Drivers must not access this member. This member is defined starting with Windows Vista.

CreateOptions

A bitwise OR of flags. For more information about these flags, see the CreateOptions parameter of the ZwCreateKey routine. This member is defined starting with Windows Vista.

Class

A pointer to a UNICODE_STRING structure that identifies the key's object class. For more information about this member, see the Class parameter of the ZwCreateKey routine. This member is defined starting with Windows Vista.

SecurityDescriptor

A pointer to a SECURITY_DESCRIPTOR structure that contains security information for the key object. This member is defined starting with Windows Vista.

SecurityQualityOfService

A pointer to a SECURITY_QUALITY_OF_SERVICE structure, which is defined in Winnt.h. This member is defined starting with Windows Vista.

DesiredAccess

The access mask that was specified by the thread that is attempting to create the registry key. This member is defined starting with Windows Vista.

GrantedAccess

An access mask that indicates the access rights that have been granted to the thread that is attempting to create the registry key. For more information about this member, see Remarks. This member is defined starting with Windows Vista.

Disposition

A value that indicates whether the registry key was created. For more information about this member, see the Disposition parameter of the ZwCreateKey routine and the following Remarks section. This member is defined starting with Windows Vista.

ResultObject

A pointer to a location that receives the address of the key object that represents the created registry key. For more information about this member, see Remarks. This member is defined starting with Windows Vista.

CallContext

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

RootObjectContext

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

Transaction

A pointer to a transaction object that the operation is attempted on. If this member is NULL, the operation is being performed in non-transactional context. This member is defined starting with Windows Vista.

Reserved

Starting with Windows Vista, if this member is 1, then it is safe to cast this structure to type REG_CREATE_KEY_INFORMATION_V1, which contains additional parameters.

In versions of Windows before Windows Vista, this member is always 0.

Remarks

The configuration manager passes this structure to the RegistryCallback routine every time a thread attempts to create a key—for example, when a user-mode thread calls RegCreateKey or RegCreateKeyEx or when a driver calls ZwCreateKey.

If the driver's RegistryCallback routine returns STATUS_CALLBACK_BYPASS for a RegNtPreCreateKeyEx notification, the driver must supply the GrantedAccess, Disposition, and ResultObject values.

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

Requirements

Version

Available starting with Windows Server 2003, but some structure members are available only in Windows Vista and later versions.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

See also

REG_CREATE_KEY_INFORMATION_V1
REG_POST_OPERATION_INFORMATION
RegistryCallback
SECURITY_DESCRIPTOR
UNICODE_STRING
ZwCreateKey

 

 

Send comments about this topic to Microsoft

Show: