The Registry class.
More...
#include <w32dlib/registry.h>
|
| | Registry (HKEY root, const TCHAR *path, bool permanent) |
| | Opens the supplied registry key read/write.
|
| |
| | Registry (HKEY root, const TCHAR *path) |
| | Opens the supplied registry key read only.
|
| |
| virtual | ~Registry () |
| | Destructor.
|
| |
| bool | IsOpen () |
| | Sees whether the key was opened.
|
| |
| bool | Read (const TCHAR *name, bool &val) |
| | Reads a boolean value from the registry.
|
| |
| bool | Read (const TCHAR *name, unsigned &val) |
| | Reads an integer value from the registry.
|
| |
| bool | Read (const TCHAR *name, W32String &val) |
| | Reads a string value from the registry.
|
| |
| bool | Write (const TCHAR *name, bool val) |
| | Writes a boolean value to the registry.
|
| |
| bool | Write (const TCHAR *name, unsigned val) |
| | Writes an integer value to the registry.
|
| |
| bool | Write (const TCHAR *name, const TCHAR *val) |
| | Writes a string value to the registry.
|
| |
| bool | Write (const TCHAR *name, const W32String &val) |
| | Writes a string value to the registry.
|
| |
The Registry class.
Gives basic registry access.
| W32DLib::Registry::Registry |
( |
HKEY |
root, |
|
|
const TCHAR * |
path, |
|
|
bool |
permanent |
|
) |
| |
Opens the supplied registry key read/write.
- Parameters
-
| root | The root of the key (use Windows HKEY_xxx constants). |
| path | The path to the key. |
| permanent | If false then the key is created volatile (ie. not saved to disk). This is ignored by Windows for Win9X. |
| W32DLib::Registry::Registry |
( |
HKEY |
root, |
|
|
const TCHAR * |
path |
|
) |
| |
Opens the supplied registry key read only.
- Parameters
-
| root | The root of the key (use Windows HKEY_xxx constants). |
| path | The path to the key. |
| virtual W32DLib::Registry::~Registry |
( |
| ) |
|
|
virtual |
Destructor.
This closes the registry key.
| bool W32DLib::Registry::IsOpen |
( |
| ) |
|
Sees whether the key was opened.
- Returns
- True if the key was created/opened OK.
| bool W32DLib::Registry::Read |
( |
const TCHAR * |
name, |
|
|
bool & |
val |
|
) |
| |
Reads a boolean value from the registry.
Booleans are implemented as a DWORD entry with a value 1 or 0.
- Parameters
-
| name | The name of the value. |
| val | A reference to a place to store the result. |
- Returns
- True if the value could be read.
| bool W32DLib::Registry::Read |
( |
const TCHAR * |
name, |
|
|
unsigned & |
val |
|
) |
| |
Reads an integer value from the registry.
- Parameters
-
| name | The name of the value. |
| val | A reference to a place to store the result. |
- Returns
- True if the value could be read.
| bool W32DLib::Registry::Read |
( |
const TCHAR * |
name, |
|
|
W32String & |
val |
|
) |
| |
Reads a string value from the registry.
- Parameters
-
| name | The name of the value. |
| val | A reference to a place to store the result. |
- Returns
- True if the value could be read.
| bool W32DLib::Registry::Write |
( |
const TCHAR * |
name, |
|
|
bool |
val |
|
) |
| |
Writes a boolean value to the registry.
Booleans are implemented as a DWORD entry with a value 1 or 0.
- Parameters
-
| name | The name of the value. |
| val | The value. |
- Returns
- True if the value could be read.
| bool W32DLib::Registry::Write |
( |
const TCHAR * |
name, |
|
|
unsigned |
val |
|
) |
| |
Writes an integer value to the registry.
- Parameters
-
| name | The name of the value. |
| val | The value. |
- Returns
- True if the value was written.
| bool W32DLib::Registry::Write |
( |
const TCHAR * |
name, |
|
|
const TCHAR * |
val |
|
) |
| |
Writes a string value to the registry.
- Parameters
-
| name | The name of the value. |
| val | The value. |
- Returns
- True if the value was written.
| bool W32DLib::Registry::Write |
( |
const TCHAR * |
name, |
|
|
const W32String & |
val |
|
) |
| |
Writes a string value to the registry.
- Parameters
-
| name | The name of the value. |
| val | The value. |
- Returns
- True if the value was written.
The documentation for this class was generated from the following file: