pub struct VmmRegValue<'a> {
pub name: String,
pub path: String,
pub raw_type: u32,
pub raw_size: u32,
/* private fields */
}Expand description
Registry Value API.
The VmmRegValue info struct represents a registry value and also have
additional access methods for parent key and the value itself.
Registry values may be addressed either by its full path or by hive address and hive path. Both addressing modes are shown in the examples below. Registry values are case sensitive.
§Created By
§Examples
// Retrieve a REG_SZ (string) reg value by its full path.
let regpath = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ProgramFilesDir";
let regvalue = vmm.reg_key(regpath)?
println!("{regvalue}");
if let Ok(VmmRegValueType::REG_SZ(s)) = regvalue.value() {
println!("REG_SZ: {s}");
}// Retrieve a REG_DWORD reg value using the hive path.
// (SOFTWARE hive example address: 0xffffba061a908000).
let regpath = "0xffffba061a908000\\ROOT\\Microsoft\\.NETFramework\\Enable64Bit";
let regvalue = vmm.reg_key(regpath)?
if let Ok(VmmRegValueType::REG_DWORD(dw)) = regvalue.value() {
println!("REG_DWORD: 0x{:08x}", dw);
}Fields§
§name: StringValue name.
path: StringPath including key name.
raw_type: u32The raw type as specified by Windows REG_* constants.
raw_size: u32The raw data size in bytes.
Implementations§
Source§impl VmmRegValue<'_>
impl VmmRegValue<'_>
Sourcepub fn parent(&self) -> ResultEx<VmmRegKey<'_>>
pub fn parent(&self) -> ResultEx<VmmRegKey<'_>>
Retrieve the parent registry key.
§Examples
let regkey_parent = regvalue.parent()?
println!("{regkey_parent");Sourcepub fn value(&self) -> ResultEx<VmmRegValueType>
pub fn value(&self) -> ResultEx<VmmRegValueType>
Retrieve the registry value.
The registry value is returned as VmmRegValueType enum containing
the relevant embedded value.
§Examples
// Retrieve a REG_SZ (string) reg value.
if let Ok(VmmRegValueType::REG_SZ(s)) = regvalue.value() {
println!("REG_SZ: {s}");
}// Retrieve a REG_DWORD reg value.
if let Ok(VmmRegValueType::REG_DWORD(dw)) = regvalue.value() {
println!("REG_DWORD: 0x{:08x}", dw);
}Trait Implementations§
Source§impl<'a> Clone for VmmRegValue<'a>
impl<'a> Clone for VmmRegValue<'a>
Source§fn clone(&self) -> VmmRegValue<'a>
fn clone(&self) -> VmmRegValue<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for VmmRegValue<'a>
impl<'a> Debug for VmmRegValue<'a>
Source§impl Display for VmmRegValue<'_>
impl Display for VmmRegValue<'_>
Source§impl PartialEq for VmmRegValue<'_>
impl PartialEq for VmmRegValue<'_>
Auto Trait Implementations§
impl<'a> Freeze for VmmRegValue<'a>
impl<'a> RefUnwindSafe for VmmRegValue<'a>
impl<'a> Send for VmmRegValue<'a>
impl<'a> Sync for VmmRegValue<'a>
impl<'a> Unpin for VmmRegValue<'a>
impl<'a> UnwindSafe for VmmRegValue<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more