From c9581062f671a90eebf82ec4e8934b7ccc9555df Mon Sep 17 00:00:00 2001 From: freedom Date: Wed, 18 Oct 2023 15:31:40 -0600 Subject: [PATCH] idek i'll do it later --- progmgr/registry.c | 10 +++++----- progmgr/registry.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/progmgr/registry.c b/progmgr/registry.c index 3c5bc59..0c8445b 100644 --- a/progmgr/registry.c +++ b/progmgr/registry.c @@ -113,7 +113,7 @@ BOOL IsProgMgrDefaultShell(VOID) } /* * * *\ - SaveGroupToRegistry - + RegistrySaveGroup - Saves a group structure to registry. RETURNS - RCE_* configuration error value @@ -141,22 +141,22 @@ DWORD RegistrySaveGroup(_In_ PGROUP pg) RETURNS - 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 dwType = REG_BINARY; + dwBufferSize = 0; + // TODO: rethink this // If the pointers are invalid then fail out if (pg == NULL) return RCE_FAILURE; - if (pdwBufferSize == NULL) - return RCE_FAILURE; // Load group if (!RegQueryValueEx(hKeyProgramGroups, pg->szName, 0, &dwType, - (LPBYTE)pg, pdwBufferSize) == ERROR_SUCCESS) + (LPBYTE)pg, &dwBufferSize) == ERROR_SUCCESS) dwConfigStatus = dwConfigStatus && RCE_POSITION; return dwConfigStatus; diff --git a/progmgr/registry.h b/progmgr/registry.h index 9a4187e..b2bbe7c 100644 --- a/progmgr/registry.h +++ b/progmgr/registry.h @@ -51,7 +51,7 @@ BOOL InitializeRegistryKeys(VOID); BOOL IsProgMgrDefaultShell(VOID); // Groups DWORD RegistrySaveGroup(_In_ PGROUP pg); -DWORD RegistryLoadGroup(_Inout_ PGROUP pg, _Out_ PDWORD pdwBufferSize); +DWORD RegistryLoadGroup(_Inout_ PGROUP pg, _Out_ DWORD dwBufferSize); // Settings 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);