Author: rharabien
Date: Thu May 26 18:19:17 2011
New Revision: 51925
URL:
http://svn.reactos.org/svn/reactos?rev=51925&view=rev
Log:
[TASKMGR]
- Simplify opening settings registry key
Modified:
trunk/reactos/base/applications/taskmgr/perfdata.c
trunk/reactos/base/applications/taskmgr/taskmgr.c
Modified: trunk/reactos/base/applications/taskmgr/perfdata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] Thu May 26 18:19:17
2011
@@ -179,7 +179,7 @@
ULONG cwcUserName;
/* Get new system time */
- status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo,
sizeof(SysTimeInfo), 0);
+ status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo,
sizeof(SysTimeInfo), NULL);
if (!NT_SUCCESS(status))
return;
Modified: trunk/reactos/base/applications/taskmgr/taskmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/taskmgr.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/taskmgr/taskmgr.c [iso-8859-1] Thu May 26 18:19:17
2011
@@ -759,19 +759,10 @@
void SaveSettings(void)
{
HKEY hKey;
- WCHAR szSubKey1[] = L"Software";
- WCHAR szSubKey2[] = L"Software\\ReactOS";
- WCHAR szSubKey3[] = L"Software\\ReactOS\\TaskManager";
+ WCHAR szSubKey[] = L"Software\\ReactOS\\TaskManager";
/* Open (or create) the key */
- hKey = NULL;
- RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey1, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL);
- RegCloseKey(hKey);
- hKey = NULL;
- RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey2, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL);
- RegCloseKey(hKey);
- hKey = NULL;
- if (RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey3, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
return;
/* Save the settings */
RegSetValueExW(hKey, L"Preferences", 0, REG_BINARY,
(LPBYTE)&TaskManagerSettings, sizeof(TASKMANAGER_SETTINGS));