Author: ekohl
Date: Sat Nov 10 19:50:22 2007
New Revision: 30335
URL:
http://svn.reactos.org/svn/reactos?rev=30335&view=rev
Log:
- Notify the system of changes to the environment variables.
- Parse pagefile sizes properly.
- Make pagefile sizes fully readable.
Modified:
trunk/reactos/dll/cpl/sysdm/environment.c
trunk/reactos/dll/cpl/sysdm/virtmem.c
Modified: trunk/reactos/dll/cpl/sysdm/environment.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/environment.…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/environment.c (original)
+++ trunk/reactos/dll/cpl/sysdm/environment.c Sat Nov 10 19:50:22 2007
@@ -723,6 +723,8 @@
case IDOK:
SetAllVars(hwndDlg, IDC_USER_VARIABLE_LIST);
SetAllVars(hwndDlg, IDC_SYSTEM_VARIABLE_LIST);
+ SendMessage(HWND_BROADCAST, WM_WININICHANGE,
+ 0, (LPARAM)_T("Environment"));
EndDialog(hwndDlg, 0);
return TRUE;
Modified: trunk/reactos/dll/cpl/sysdm/virtmem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/virtmem.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/virtmem.c (original)
+++ trunk/reactos/dll/cpl/sysdm/virtmem.c Sat Nov 10 19:50:22 2007
@@ -67,21 +67,37 @@
}
-static INT
-GetPageFileSizes(LPTSTR lpPageFiles)
-{
+static VOID
+GetPageFileSizes(LPTSTR lpPageFiles,
+ LPINT lpInitialSize,
+ LPINT lpMaximumSize)
+{
+ INT i = 0;
+
+ *lpInitialSize = -1;
+ *lpMaximumSize = -1;
+
while (*lpPageFiles != _T('\0'))
{
if (*lpPageFiles == _T(' '))
{
lpPageFiles++;
- return (INT)_ttoi(lpPageFiles);
+
+ switch (i)
+ {
+ case 0:
+ *lpInitialSize = (INT)_ttoi(lpPageFiles);
+ i = 1;
+ break;
+
+ case 1:
+ *lpMaximumSize = (INT)_ttoi(lpPageFiles);
+ return;
+ }
}
lpPageFiles++;
}
-
- return -1;
}
@@ -123,8 +139,9 @@
if (!_tcsncmp(pVirtMem->szPagingFiles, szDrive, 2))
{
/* FIXME: we only check the first available pagefile in the reg */
- InitialSize = GetPageFileSizes(pVirtMem->szPagingFiles);
- MaxSize = GetPageFileSizes(pVirtMem->szPagingFiles);
+ GetPageFileSizes(pVirtMem->szPagingFiles,
+ &InitialSize,
+ &MaxSize);
pVirtMem->Pagefile[PgCnt].InitialValue = InitialSize;
pVirtMem->Pagefile[PgCnt].MaxValue = MaxSize;
@@ -245,7 +262,7 @@
static VOID
SetListBoxColumns(HWND hwndListBox)
{
- const INT tabs[2] = {30, 170};
+ const INT tabs[2] = {30, 120};
SendMessage(hwndListBox, LB_SETTABSTOPS, (WPARAM)2, (LPARAM)&tabs[0]);
}