registry file update
This commit is contained in:
@@ -135,33 +135,6 @@ DWORD RegistrySaveGroup(_In_ PGROUP pg)
|
|||||||
return dwConfigStatus;
|
return dwConfigStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* * * *\
|
|
||||||
RegistryLoadGroup -
|
|
||||||
Loads a group structure from the registry.
|
|
||||||
RETURNS -
|
|
||||||
RCE_* configuration error value
|
|
||||||
\* * * */
|
|
||||||
DWORD RegistryLoadGroup(_Inout_ PGROUP pg, _Out_ DWORD dwBufferSize)
|
|
||||||
{
|
|
||||||
DWORD dwConfigStatus = RCE_SUCCESS;
|
|
||||||
DWORD dwType = REG_BINARY;
|
|
||||||
|
|
||||||
dwBufferSize = 0;
|
|
||||||
|
|
||||||
// TODO: rethink this
|
|
||||||
|
|
||||||
// If the pointers are invalid then fail out
|
|
||||||
if (pg == NULL)
|
|
||||||
return RCE_FAILURE;
|
|
||||||
|
|
||||||
// Load group
|
|
||||||
if (!RegQueryValueEx(hKeyProgramGroups, pg->szName, 0, &dwType,
|
|
||||||
(LPBYTE)pg, &dwBufferSize) == ERROR_SUCCESS)
|
|
||||||
dwConfigStatus = dwConfigStatus && RCE_POSITION;
|
|
||||||
|
|
||||||
return dwConfigStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* * * *\
|
/* * * *\
|
||||||
SaveConfig -
|
SaveConfig -
|
||||||
Finds and collapses all settings
|
Finds and collapses all settings
|
||||||
@@ -192,7 +165,7 @@ DWORD SaveConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups, _In_ BO
|
|||||||
|
|
||||||
if (bPos)
|
if (bPos)
|
||||||
{
|
{
|
||||||
WINDOWPLACEMENT wpProgMgr;
|
WINDOWPLACEMENT wpProgMgr = { 0 };
|
||||||
RECT rcWindow;
|
RECT rcWindow;
|
||||||
|
|
||||||
// Get and save window position
|
// Get and save window position
|
||||||
@@ -209,10 +182,6 @@ DWORD SaveConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups, _In_ BO
|
|||||||
{
|
{
|
||||||
HWND hWndGroup = NULL;
|
HWND hWndGroup = NULL;
|
||||||
|
|
||||||
// TODO: Get list of groups, iterate through,
|
|
||||||
// save each one as an individual subkey based
|
|
||||||
// on the name of the group
|
|
||||||
|
|
||||||
EnumChildWindows(hWndMDIClient, &SaveWindowEnumProc, (LPARAM)bExit);
|
EnumChildWindows(hWndMDIClient, &SaveWindowEnumProc, (LPARAM)bExit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,11 +318,13 @@ DWORD LoadConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups)
|
|||||||
(LPBYTE)pGroup, &cbGroup);
|
(LPBYTE)pGroup, &cbGroup);
|
||||||
|
|
||||||
// load the group
|
// load the group
|
||||||
CreateGroup(pGroup);
|
|
||||||
|
|
||||||
// free memory
|
|
||||||
if (pGroup)
|
if (pGroup)
|
||||||
|
{
|
||||||
|
CreateGroup(pGroup);
|
||||||
|
|
||||||
|
// free memory
|
||||||
free(pGroup);
|
free(pGroup);
|
||||||
|
}
|
||||||
|
|
||||||
// increment
|
// increment
|
||||||
cGroupIndex++;
|
cGroupIndex++;
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ BOOL InitializeRegistryKeys(VOID);
|
|||||||
BOOL IsProgMgrDefaultShell(VOID);
|
BOOL IsProgMgrDefaultShell(VOID);
|
||||||
// Groups
|
// Groups
|
||||||
DWORD RegistrySaveGroup(_In_ PGROUP pg);
|
DWORD RegistrySaveGroup(_In_ PGROUP pg);
|
||||||
DWORD RegistryLoadGroup(_Inout_ PGROUP pg, _Out_ DWORD dwBufferSize);
|
|
||||||
// Settings
|
// Settings
|
||||||
DWORD SaveConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups, _In_ BOOL bExit);
|
DWORD SaveConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups, _In_ BOOL bExit);
|
||||||
DWORD LoadConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups);
|
DWORD LoadConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups);
|
||||||
|
|||||||
Reference in New Issue
Block a user