#ifndef _NTREGAPI_H
/**
* The KEY_NAME_INFORMATION structure holds the name and name length of the key.
* \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntddk-_key_name_information
*/
typedef struct _KEY_NAME_INFORMATION
{
ULONG NameLength; // The size, in bytes, of the key name string in the Name array.
_Field_size_bytes_(NameLength) WCHAR Name[1]; // The name of the registry key. This string is not null-terminated.
} KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
View code on GitHub
// ntddk.h
typedef struct _KEY_NAME_INFORMATION {
ULONG NameLength;
WCHAR Name[1];
} KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
View the official Windows Driver Kit DDI reference
This structure is documented in Windows Driver Kit.
The KEY_NAME_INFORMATION structure holds the name and name length of the key.
NameLength
The size, in bytes, of the key name string in the Name array.
Name
An array of wide characters that contains the name of the key. This character string is not null-terminated. Only the first element in this array is included in the KEY_NAME_INFORMATION structure definition. The storage for the remaining elements in the array immediately follows this element.
The ZwQueryKey routine uses the KEY_NAME_INFORMATION structure to contain the registry key name. When the KeyInformationClass parameter of this routine is KeyNameInformation, the KeyInformation buffer is treated as a KEY_NAME_INFORMATION structure. For more information about the KeyNameInformation enumeration value, see KEY_INFORMATION_CLASS.
KEY_VIRTUALIZATION_INFORMATION