#include <registry.h>
Public Member Functions | |
LoadRegistryEntries () | |
~LoadRegistryEntries () | |
Standard destructor. | |
BOOL | StartLoading (String_256 *pKeySpecifier, HKEY hSubKey=hAppStateRegKey) |
Starts the process of saving our a series of registry entries e.g. a pathname list. A sub-key to the main section can be specified so that instead of opening the section <program> \ *pKeySpecifier it opens a sub-section to this. | |
BOOL | LoadNextEntry (String_256 *pNextName) |
Loads in the next entry into the opened key. | |
BOOL | StopLoading () |
Stops the process of loading our a series of registry entries e.g. a pathname list. | |
HKEY | GetRegKey () |
INT32 | GetNumberOfItemsLoaded () |
Private Member Functions | |
CC_DECLARE_MEMDUMP (LoadRegistryEntries) | |
Private Attributes | |
HKEY | m_hRegKey |
INT32 | m_Counter |
Definition at line 203 of file registry.h.
|
Definition at line 208 of file registry.h.
|
|
Standard destructor.
Definition at line 1345 of file registry.cpp. 01346 { 01347 if (m_hRegKey != NULL) 01348 CloseRegKey(m_hRegKey); 01349 return; 01350 }
|
|
|
|
Definition at line 217 of file registry.h. 00217 { return m_Counter; }
|
|
Definition at line 216 of file registry.h. 00216 { return m_hRegKey; }
|
|
Loads in the next entry into the opened key.
Definition at line 1302 of file registry.cpp. 01303 { 01304 if (m_hRegKey == NULL) 01305 return FALSE; 01306 01307 // Cannot save out the item with a blank name so invent a unique name for it 01308 TCHAR buf[10]; 01309 wsprintf(buf, TEXT("%d"), m_Counter + 1); 01310 m_Counter++; 01311 01312 return GetRegString(m_hRegKey, buf, pNextName); 01313 }
|
|
Starts the process of saving our a series of registry entries e.g. a pathname list. A sub-key to the main section can be specified so that instead of opening the section <program> \ *pKeySpecifier it opens a sub-section to this.
Definition at line 1267 of file registry.cpp. 01268 { 01269 // Don't do this under Win32s. 01270 if (IsWin32s() && !IsWin32c()) return FALSE; 01271 01272 ERROR2IF(hSubKey == NULL, FALSE, "LoadRegistryEntries::StartLoading Bad main app key "); 01273 ERROR2IF(pKeySpecifier == NULL, FALSE, "LoadRegistryEntries::StartLoading Bad key specifier"); 01274 ERROR2IF(m_hRegKey != NULL, FALSE, "LoadRegistryEntries::StartLoading hRegKey is already non-null"); 01275 01276 // First open a new sub-key under the app-state key for holding the data. 01277 // e.g. TEXT("Workspace\\MDI") 01278 // Use the passed in key which will default to the main app hAppStateRegKey if not supplied 01279 m_hRegKey = OpenRegKey(hSubKey, *pKeySpecifier); 01280 if (m_hRegKey == NULL) 01281 { 01282 // don't error as some people require this functionality 01283 //ERROR3("Can't get a registry key in LoadRegistryEntries::StartLoading"); 01284 return FALSE; 01285 } 01286 01287 return TRUE; 01288 }
|
|
Stops the process of loading our a series of registry entries e.g. a pathname list.
Definition at line 1327 of file registry.cpp. 01328 { 01329 ERROR2IF(m_hRegKey == NULL, FALSE, "hRegKey is null"); 01330 BOOL closed = CloseRegKey(m_hRegKey); 01331 m_hRegKey = NULL; 01332 return closed; 01333 }
|
|
Definition at line 221 of file registry.h. |
|
Definition at line 220 of file registry.h. |