#include <registry.h>
Classes | |
class | accessor |
Represents an internal object used to read or write registry values. More... | |
Public Member Functions | |
RegistryKey (HKEY hRootKey, const TCHAR *ptszSubkey) | |
RegistryKey (const RegistryKey &rootKey, const TCHAR *ptszSubkey) | |
~RegistryKey () | |
accessor | operator[] (const TCHAR *ptszValue) |
template<class _Type > | |
bool | _SerializerEntry (const TCHAR *ptszValue, _Type *ref, bool Save) |
This method is called by serializer subsystem to read/write a field of a serialized structure. | |
Public Attributes | |
IMPLEMENT_STD_SERIALIZE_METHOD | |
IMPLEMENT_STD_DESERIALIZE_METHOD | |
Private Member Functions | |
RegistryKey (const RegistryKey &key) | |
void | operator= (const RegistryKey &key) |
Private Attributes | |
HKEY | m_hKey |
IMPLEMENT_EMPTY_SERIALIZE_WRAPPER | |
IMPLEMENT_EMPTY_DESERIALIZE_WRAPPER |
The RegistryKey class allows accessing registry keys according to the following scenario:
RegistryKey key(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion")); String str = key[_T("ProgramFilesDir")]; str[0] = 'C'; key[_T("ProgramFilesDir")] = str;
... RegistryKey subKey(key, "Run"); ...
... TCHAR tsz[256]; key[_T("SomeValuename")].ReadToCharArray(tsz, sizeof(tsz)); ...
BazisLib::Win32::RegistryKey::RegistryKey | ( | const RegistryKey & | key | ) | [inline, private] |
BazisLib::Win32::RegistryKey::RegistryKey | ( | HKEY | hRootKey, | |
const TCHAR * | ptszSubkey | |||
) | [inline] |
BazisLib::Win32::RegistryKey::RegistryKey | ( | const RegistryKey & | rootKey, | |
const TCHAR * | ptszSubkey | |||
) | [inline] |
BazisLib::Win32::RegistryKey::~RegistryKey | ( | ) | [inline] |
bool BazisLib::Win32::RegistryKey::_SerializerEntry | ( | const TCHAR * | ptszValue, | |
_Type * | ref, | |||
bool | Save | |||
) | [inline] |
This method is called by serializer subsystem to read/write a field of a serialized structure.
This template method does basically save or load a field of a serialized structure.
ptszValue | Specifies the field name. RegistryKey class uses this name as a registry value name. | |
ref | Points to the field to save/load. | |
Save | If this parameter is true, the save operation is required, of false - load operation should be performed. |
void BazisLib::Win32::RegistryKey::operator= | ( | const RegistryKey & | key | ) | [inline, private] |
accessor BazisLib::Win32::RegistryKey::operator[] | ( | const TCHAR * | ptszValue | ) | [inline] |
HKEY BazisLib::Win32::RegistryKey::m_hKey [private] |