idek i'll do it later

This commit is contained in:
freedom
2023-10-18 15:31:40 -06:00
parent e0fa6632cd
commit c9581062f6
2 changed files with 6 additions and 6 deletions

View File

@@ -113,7 +113,7 @@ BOOL IsProgMgrDefaultShell(VOID)
} }
/* * * *\ /* * * *\
SaveGroupToRegistry - RegistrySaveGroup -
Saves a group structure to registry. Saves a group structure to registry.
RETURNS - RETURNS -
RCE_* configuration error value RCE_* configuration error value
@@ -141,22 +141,22 @@ DWORD RegistrySaveGroup(_In_ PGROUP pg)
RETURNS - RETURNS -
RCE_* configuration error value RCE_* configuration error value
\* * * */ \* * * */
DWORD RegistryLoadGroup(_Inout_ PGROUP pg, _Out_ PDWORD pdwBufferSize) DWORD RegistryLoadGroup(_Inout_ PGROUP pg, _Out_ DWORD dwBufferSize)
{ {
DWORD dwConfigStatus = RCE_SUCCESS; DWORD dwConfigStatus = RCE_SUCCESS;
DWORD dwType = REG_BINARY; DWORD dwType = REG_BINARY;
dwBufferSize = 0;
// TODO: rethink this // TODO: rethink this
// If the pointers are invalid then fail out // If the pointers are invalid then fail out
if (pg == NULL) if (pg == NULL)
return RCE_FAILURE; return RCE_FAILURE;
if (pdwBufferSize == NULL)
return RCE_FAILURE;
// Load group // Load group
if (!RegQueryValueEx(hKeyProgramGroups, pg->szName, 0, &dwType, if (!RegQueryValueEx(hKeyProgramGroups, pg->szName, 0, &dwType,
(LPBYTE)pg, pdwBufferSize) == ERROR_SUCCESS) (LPBYTE)pg, &dwBufferSize) == ERROR_SUCCESS)
dwConfigStatus = dwConfigStatus && RCE_POSITION; dwConfigStatus = dwConfigStatus && RCE_POSITION;
return dwConfigStatus; return dwConfigStatus;

View File

@@ -51,7 +51,7 @@ 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_ PDWORD pdwBufferSize); 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);