System::Win32Registry Class Reference
#include <win32registry.h>
Detailed Description
A simple wrapper class to access the Win32 registry. NOTE: using this class restricts your code to the Win32 platform.(C) 2007 Radon Labs GmbH
Public Types | |
| enum | RootKey |
| key enumeration | |
Static Public Member Functions | |
| static bool | Exists (RootKey rootKey, const Util::String &key, const Util::String &name) |
| return true if a registry entry exists | |
| static bool | WriteString (RootKey rootKey, const Util::String &key, const Util::String &name, const Util::String &value) |
| write a registry entry | |
| static Util::String | ReadString (RootKey rootKey, const Util::String &key, const Util::String &name) |
| read a string registry entry, the string will be UTF-8 encoded! | |
| static int | ReadInt (RootKey rootKey, const Util::String &key, const Util::String &name) |
| read an int registry entry | |
| static bool | Delete (RootKey rootKey, const Util::String &key) |
| delete a registry key (and all its contained values) | |
| static RootKey | AsRootKey (const Util::String &str) |
| convert rootkey from string | |
Member Function Documentation
| bool System::Win32Registry::Exists | ( | RootKey | rootKey, | |
| const Util::String & | key, | |||
| const Util::String & | name | |||
| ) | [static] |
return true if a registry entry exists
Return true if a specific entry exists in the registry. To check only for the existence of a key without the contained value, pass an empty 'name' string.
| bool System::Win32Registry::WriteString | ( | RootKey | rootKey, | |
| const Util::String & | key, | |||
| const Util::String & | name, | |||
| const Util::String & | value | |||
| ) | [static] |
write a registry entry
Set a key value in the registry. This will create the key if it doesn't exist.
| String System::Win32Registry::ReadString | ( | RootKey | rootKey, | |
| const Util::String & | key, | |||
| const Util::String & | name | |||
| ) | [static] |
read a string registry entry, the string will be UTF-8 encoded!
Get a string value from the registry. Fails hard if the key doesn't exists (use the Exists() method to make sure that the key exists!). NOTE that this method returns an UTF-8 encoded string!
| int System::Win32Registry::ReadInt | ( | RootKey | rootKey, | |
| const Util::String & | key, | |||
| const Util::String & | name | |||
| ) | [static] |
read an int registry entry
Get an int value from the registry. Fails hard if the key doesn't exists (use the Exists() method to make sure that the key exists!).
| bool System::Win32Registry::Delete | ( | RootKey | rootKey, | |
| const Util::String & | key | |||
| ) | [static] |
delete a registry key (and all its contained values)
This deletes a complete registry key with all its values.
| Win32Registry::RootKey System::Win32Registry::AsRootKey | ( | const Util::String & | str | ) | [static] |
convert rootkey from string
Converts a string (all capitels, e.g. HKEY_CURRENT_USER) into a RootKey value.