Gets a value for the current key. # Arguments `name` - A string containing the name of the value. # Examples ``` # use ntreg::registry_key::*; let key = RegistryKey::new(r"HKCU\Environment").unwrap(); let value = key.get_value("Path"); assert!(value.is_ok()); ```
(&self, name: &str)
| 280 | /// assert!(value.is_ok()); |
| 281 | /// ``` |
| 282 | pub fn get_value(&self, name: &str) -> Result<RegistryValue, NtStatusError> { |
| 283 | let mut reg_value = RegistryValue { |
| 284 | key_path: self.path.clone(), |
| 285 | name: name.to_string(), |
| 286 | data: RegistryValueData::None, |
| 287 | }; |
| 288 | reg_value.query()?; |
| 289 | Ok(reg_value) |
| 290 | } |
| 291 | |
| 292 | /// Creates or sets a value for the current key. |
| 293 | /// |