Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenfbtreg.h
Go to the documentation of this file.
00001 #ifndef REG_H 00002 #define REG_H 00003 00004 class CReg 00005 { 00006 public: 00007 // Constructor 00008 CReg(LPCSTR lpszSubKey, HKEY hRootKey=HKEY_CURRENT_USER, REGSAM regSam=KEY_ALL_ACCESS, BOOL bCreate=TRUE); 00009 00010 // Destructor 00011 ~CReg(); 00012 00013 // Get the specified registry value 00014 BOOL GetValue(LPCSTR lpszValueName, LPVOID lpvData, DWORD *dwBuffSize=NULL, DWORD *dwDataType=NULL); 00015 BOOL GetValue(LPCSTR lpszValueName, LPSTR lpszValue, DWORD dwBalueSize); 00016 // BOOL GetValue(LPCSTR lpszValueName, CString &szData, DWORD *dwDataType=NULL); 00017 BOOL GetValue(LPCSTR lpszValueName, DWORD &dwData); 00018 BOOL GetValue(LPCSTR lpszValueName, BOOL &bData); 00019 00020 // Set the specified registry value 00021 BOOL SetValue(LPCSTR lpszValueName, const LPVOID lpvData, DWORD dwDataSize, DWORD dwDataType=REG_SZ); 00022 BOOL SetValue(LPCSTR lpszValueName, LPCSTR lpszValue, DWORD dwDataSize=0, DWORD dwDataType=REG_SZ); 00023 BOOL SetValue(LPCSTR lpszValueName, LPSTR lpszValue, DWORD dwValueSize); 00024 // BOOL SetValue(LPCSTR lpszValueName, CString &szData, DWORD dwDataSize=0, DWORD dwDataType=REG_SZ); 00025 BOOL SetValue(LPCSTR lpszValueName, DWORD dwData); 00026 BOOL SetValue(LPCSTR lpszValueName, BOOL bData); 00027 00028 // Delete a value in the key 00029 BOOL DeleteValue(LPCSTR lpszValueName); 00030 00031 // Delete all the values in the key 00032 BOOL DeleteValues(); 00033 00034 // Delete a sub key 00035 BOOL DeleteKey(LPCSTR lpszKeyName); 00036 00037 // Retrieve the names of the values in the key 00038 // BOOL EnumerateValues(CStringArray &nszValueNames); 00039 00040 BOOL IsValid() {return m_hKey!=NULL;} 00041 00042 protected: 00043 // Create a new registry key 00044 LONG Create(LPCSTR lpszSubKey, HKEY hRootKey, HKEY *hKey=NULL, REGSAM regSam=NULL); 00045 00046 // Open the specified registry key (creates if non-existant) 00047 LONG Open(LPCSTR lpszSubKey, HKEY hRootKey, HKEY *hKey=NULL, REGSAM regSam=NULL, BOOL bCreate=TRUE); 00048 00049 BOOL DeleteKey(HKEY hRootKey, HKEY hKey, LPCSTR szKey, LPCSTR szSubKey); 00050 00051 // CString m_szKey; // Name of key this object wraps 00052 char m_szKey[1024]; // Name of key this object wraps 00053 HKEY m_hRootKey; // Root key of the wrapped key 00054 HKEY m_hKey; // Key generated by Open/Create 00055 00056 }; 00057 00058 #endif Generated on Sun May 27 2012 04:27:14 for ReactOS by
1.7.6.1
|