pub struct KeyNode {Show 26 fields
pub signature: [u8; 2],
pub flags: u16,
pub last_written: u64,
pub access_bits: u8,
pub layered_key_flags: u8,
pub access_spare: u16,
pub parent: u32,
pub num_subkeys: u32,
pub num_volatile_subkeys: u32,
pub subkeys_list_offset: u32,
pub volatile_subkeys_list_offset: u32,
pub num_values: u32,
pub values_list_offset: u32,
pub security_offset: u32,
pub class_name_offset: u32,
pub largest_subkey_name_length: u16,
pub virtualization_flags: u8,
pub user_flags: u8,
pub debug: u8,
pub largest_subkey_class_name_length: u32,
pub largest_value_name_length: u32,
pub largest_value_data_size: u32,
pub work_var: u32,
pub key_name_length: u16,
pub class_name_length: u16,
pub key_name: Vec<u8>,
}Expand description
Key node structure (nk).
Fields§
§signature: [u8; 2]Signature: “nk”
flags: u16Flags.
last_written: u64Last written timestamp (FILETIME).
access_bits: u8Access bits (byte 0, Windows 8+).
layered_key_flags: u8Layered key bit fields (byte 1, Windows 10 RS1+).
access_spare: u16Spare bytes (bytes 2-3).
parent: u32Offset of parent key node.
num_subkeys: u32Number of subkeys.
num_volatile_subkeys: u32Number of volatile subkeys.
subkeys_list_offset: u32Offset of subkeys list.
volatile_subkeys_list_offset: u32Offset of volatile subkeys list (no meaning on disk).
num_values: u32Number of key values.
values_list_offset: u32Offset of key values list.
security_offset: u32Offset of key security item.
class_name_offset: u32Offset of class name.
largest_subkey_name_length: u16Largest subkey name length (in bytes, as UTF-16).
virtualization_flags: u8Virtualization control flags (4 bits).
user_flags: u8User flags / Wow64 flags (4 bits).
debug: u8Debug field.
largest_subkey_class_name_length: u32Largest subkey class name length.
largest_value_name_length: u32Largest value name length (in bytes, as UTF-16).
largest_value_data_size: u32Largest value data size.
work_var: u32WorkVar (cached index, not used since Windows XP).
key_name_length: u16Key name length in bytes.
class_name_length: u16Class name length in bytes.
key_name: Vec<u8>Key name (ASCII or UTF-16 depending on KEY_COMP_NAME flag).
Implementations§
Source§impl KeyNode
impl KeyNode
Sourcepub const FIXED_SIZE: usize = 76
pub const FIXED_SIZE: usize = 76
Size of the fixed part of the key node (excluding name).
Sourcepub fn get_flags(&self) -> KeyNodeFlags
pub fn get_flags(&self) -> KeyNodeFlags
Get the flags.
Sourcepub fn is_symlink(&self) -> bool
pub fn is_symlink(&self) -> bool
Check if this is a symlink.
Sourcepub fn has_subkeys(&self) -> bool
pub fn has_subkeys(&self) -> bool
Check if this key has subkeys.
Sourcepub fn has_values(&self) -> bool
pub fn has_values(&self) -> bool
Check if this key has values.
Sourcepub fn get_access_bits(&self) -> AccessBits
pub fn get_access_bits(&self) -> AccessBits
Get the access bits.
Sourcepub fn get_layered_key_flags(&self) -> LayeredKeyFlags
pub fn get_layered_key_flags(&self) -> LayeredKeyFlags
Get the layered key flags (Windows 10 RS1+).
Sourcepub fn is_tombstone(&self) -> bool
pub fn is_tombstone(&self) -> bool
Check if this is a tombstone key (layered keys feature).
Sourcepub fn get_debug_flags(&self) -> DebugFlags
pub fn get_debug_flags(&self) -> DebugFlags
Get the debug flags. These control breakpoints in checked Windows kernels when CmpRegDebugBreakEnabled is set.
Sourcepub fn get_user_flags(&self) -> UserFlags
pub fn get_user_flags(&self) -> UserFlags
Get the user flags (Wow64 flags).
Sourcepub fn get_virtualization_flags(&self) -> VirtualizationFlags
pub fn get_virtualization_flags(&self) -> VirtualizationFlags
Get the virtualization control flags.
Sourcepub fn has_class_name(&self) -> bool
pub fn has_class_name(&self) -> bool
Check if this key has a class name.
Sourcepub fn is_predef_handle(&self) -> bool
pub fn is_predef_handle(&self) -> bool
Check if this key is a predefined handle.
When true, the num_values field contains a handle instead of a value count.
Sourcepub fn get_predef_handle(&self) -> Option<u32>
pub fn get_predef_handle(&self) -> Option<u32>
Get the predefined handle value (if this is a predefined handle key). Returns None if KEY_PREDEF_HANDLE flag is not set.
Sourcepub fn total_size(&self) -> usize
pub fn total_size(&self) -> usize
Get the total size needed for this key node.