8 CReg(LPCSTR lpszSubKey
, HKEY hRootKey
=HKEY_CURRENT_USER
, REGSAM regSam
=KEY_ALL_ACCESS
, BOOL bCreate
=TRUE
);
13 // Get the specified registry value
14 BOOL
GetValue(LPCSTR lpszValueName
, LPVOID lpvData
, DWORD
*dwBuffSize
=NULL
, DWORD
*dwDataType
=NULL
);
15 BOOL
GetValue(LPCSTR lpszValueName
, LPSTR lpszValue
, DWORD dwBalueSize
);
16 // BOOL GetValue(LPCSTR lpszValueName, CString &szData, DWORD *dwDataType=NULL);
17 BOOL
GetValue(LPCSTR lpszValueName
, DWORD
&dwData
);
18 BOOL
GetValue(LPCSTR lpszValueName
, BOOL
&bData
);
20 // Set the specified registry value
21 BOOL
SetValue(LPCSTR lpszValueName
, const LPVOID lpvData
, DWORD dwDataSize
, DWORD dwDataType
=REG_SZ
);
22 BOOL
SetValue(LPCSTR lpszValueName
, LPCSTR lpszValue
, DWORD dwDataSize
=0, DWORD dwDataType
=REG_SZ
);
23 BOOL
SetValue(LPCSTR lpszValueName
, LPSTR lpszValue
, DWORD dwValueSize
);
24 // BOOL SetValue(LPCSTR lpszValueName, CString &szData, DWORD dwDataSize=0, DWORD dwDataType=REG_SZ);
25 BOOL
SetValue(LPCSTR lpszValueName
, DWORD dwData
);
26 BOOL
SetValue(LPCSTR lpszValueName
, BOOL bData
);
28 // Delete a value in the key
29 BOOL
DeleteValue(LPCSTR lpszValueName
);
31 // Delete all the values in the key
35 BOOL
DeleteKey(LPCSTR lpszKeyName
);
37 // Retrieve the names of the values in the key
38 // BOOL EnumerateValues(CStringArray &nszValueNames);
40 BOOL
IsValid() {return m_hKey
!=NULL
;}
43 // Create a new registry key
44 LONG
Create(LPCSTR lpszSubKey
, HKEY hRootKey
, HKEY
*hKey
=NULL
, REGSAM regSam
=NULL
);
46 // Open the specified registry key (creates if non-existant)
47 LONG
Open(LPCSTR lpszSubKey
, HKEY hRootKey
, HKEY
*hKey
=NULL
, REGSAM regSam
=NULL
, BOOL bCreate
=TRUE
);
49 BOOL
DeleteKey(HKEY hRootKey
, HKEY hKey
, LPCSTR szKey
, LPCSTR szSubKey
);
51 // CString m_szKey; // Name of key this object wraps
52 char m_szKey
[1024]; // Name of key this object wraps
53 HKEY m_hRootKey
; // Root key of the wrapped key
54 HKEY m_hKey
; // Key generated by Open/Create