#include <RegKey.h>
Public Member Functions | |
| CRegKey () | |
| Default constructor for a closed key. | |
| CRegKey (HKEY hKey) | |
| Construct from an existing registry key. | |
| void | Close () |
| Close any open registry key. | |
| LONG | Open (HKEY hKeyParent, LPCTSTR lpszKeyName, REGSAM samDesired=KEY_READ) |
| Open a sub-key. | |
| template<class T> | |
| LONG | QueryValue (std::basic_string< T > &strValue, LPCTSTR lpszValueName=NULL) |
| Fetch a string value. This copes with REG_SZ, REG_EXPAND_SZ or REG_MULTI_SZ. For REG_MULTI_SZ the final null terminator of the string pairs is not present (but c_str() will give the correct data as it appends a NULL...). | |
| template<class T> | |
| LONG | EnumKey (DWORD index, std::basic_string< T > &name, FILETIME *pftime=NULL) |
| Enumerate registry keys. | |
| template<class T> | |
| LONG | EnumValue (DWORD index, std::basic_string< T > &name, DWORD *pType=NULL, BYTE **ppData=NULL, DWORD *pLenData=NULL) |
| Enumerate values under a given registry key. | |
| LONG | QueryValue (BYTE *Buf, DWORD *BufSize, LPCTSTR lpszValueName=NULL) |
| Fetch a binary value. | |
| template<class T> | |
| LONG | QueryValue (T *buf, int nBuf, LPCTSTR lpszValueName=NULL) |
| Fetch a string value. | |
| LONG | QueryValue (DWORD &dwValue, LPCWSTR lpszValueName=NULL) |
| Fetch a DWORD value. | |
| LONG | QueryValue (DWORD &dwValue, LPCSTR lpszValueName=NULL) |
| Fetch a DWORD value. | |
| LONG | Create (HKEY hKeyParent, LPCTSTR lpszKeyName, LPTSTR lpszClass=REG_NONE, DWORD dwOptions=REG_OPTION_NON_VOLATILE, REGSAM samDesired=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES lpSecAttr=NULL, LPDWORD lpdwDisposition=NULL) |
| Create a new key and attach it to this class. | |
| LONG | DeleteValue (LPCTSTR lpszValueName=NULL) |
| Delete an existing value. | |
| LONG | DeleteKey (LPCTSTR lpSubKey=NULL) |
| Delete a subkey of the current key. | |
| LONG | SetValue (LPCTSTR lpszValue, LPCTSTR lpszValueName=NULL) |
| Set a string value under the given key. | |
| LONG | SetValue (const BYTE *pData, LONG bufSize, DWORD dwType=REG_BINARY, LPCTSTR lpszValueName=NULL) |
| Set a binary value under the given key. | |
| LONG | SetValue (DWORD dwValue, LPCTSTR lpszValueName=NULL) |
| Set a DWORD value under the given key. | |
| LONG | Flush () |
| Flush changes to the current key. | |
| operator HKEY () | |
| HKEY extractor for use with API functions. | |
Static Public Member Functions | |
| IsStringType (DWORD dwType) | |
| return TRUE if the given type is one of REG_EXPAND_SZ, REG_MULTI_SZ or REG_SZ | |
| IsDWORDType (DWORD dwType) | |
| return TRUE if the given type is one of REG_DWORD, REG_DWORD_LITTLE_ENDIAN or REG_DWORD_BIG_ENDIAN. | |
|
||||||||||||||||||||||||||||||||
|
Create a new key and attach it to this class.
|
|
|
Delete a subkey of the current key.
|
|
|
Delete an existing value.
|
|
||||||||||||||||||||
|
Enumerate registry keys.
|
|
||||||||||||||||||||||||||||
|
Enumerate values under a given registry key.
|
|
|
Flush changes to the current key.
|
|
||||||||||||||||
|
Open a sub-key.
|
|
||||||||||||
|
Fetch a DWORD value.
|
|
||||||||||||
|
Fetch a DWORD value.
|
|
||||||||||||||||||||
|
Fetch a string value.
|
|
||||||||||||||||
|
Fetch a binary value.
|
|
||||||||||||||||
|
Fetch a string value. This copes with REG_SZ, REG_EXPAND_SZ or REG_MULTI_SZ. For REG_MULTI_SZ the final null terminator of the string pairs is not present (but c_str() will give the correct data as it appends a NULL...).
|
|
||||||||||||
|
Set a DWORD value under the given key.
|
|
||||||||||||||||||||
|
Set a binary value under the given key.
|
|
||||||||||||
|
Set a string value under the given key.
|
1.3.9.1