mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 00:43:21 +00:00
- Notify the system of changes to the environment variables.
- Parse pagefile sizes properly. - Make pagefile sizes fully readable. svn path=/trunk/; revision=30335
This commit is contained in:
parent
24e696cde0
commit
b43d7bc04a
|
@ -723,6 +723,8 @@ EnvironmentDlgProc(HWND hwndDlg,
|
||||||
case IDOK:
|
case IDOK:
|
||||||
SetAllVars(hwndDlg, IDC_USER_VARIABLE_LIST);
|
SetAllVars(hwndDlg, IDC_USER_VARIABLE_LIST);
|
||||||
SetAllVars(hwndDlg, IDC_SYSTEM_VARIABLE_LIST);
|
SetAllVars(hwndDlg, IDC_SYSTEM_VARIABLE_LIST);
|
||||||
|
SendMessage(HWND_BROADCAST, WM_WININICHANGE,
|
||||||
|
0, (LPARAM)_T("Environment"));
|
||||||
EndDialog(hwndDlg, 0);
|
EndDialog(hwndDlg, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
|
|
@ -67,21 +67,37 @@ ReadPageFileSettings(PVIRTMEM pVirtMem)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static INT
|
static VOID
|
||||||
GetPageFileSizes(LPTSTR lpPageFiles)
|
GetPageFileSizes(LPTSTR lpPageFiles,
|
||||||
|
LPINT lpInitialSize,
|
||||||
|
LPINT lpMaximumSize)
|
||||||
{
|
{
|
||||||
|
INT i = 0;
|
||||||
|
|
||||||
|
*lpInitialSize = -1;
|
||||||
|
*lpMaximumSize = -1;
|
||||||
|
|
||||||
while (*lpPageFiles != _T('\0'))
|
while (*lpPageFiles != _T('\0'))
|
||||||
{
|
{
|
||||||
if (*lpPageFiles == _T(' '))
|
if (*lpPageFiles == _T(' '))
|
||||||
{
|
{
|
||||||
lpPageFiles++;
|
lpPageFiles++;
|
||||||
return (INT)_ttoi(lpPageFiles);
|
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*lpInitialSize = (INT)_ttoi(lpPageFiles);
|
||||||
|
i = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
*lpMaximumSize = (INT)_ttoi(lpPageFiles);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lpPageFiles++;
|
lpPageFiles++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,8 +139,9 @@ ParseMemSettings(PVIRTMEM pVirtMem)
|
||||||
if (!_tcsncmp(pVirtMem->szPagingFiles, szDrive, 2))
|
if (!_tcsncmp(pVirtMem->szPagingFiles, szDrive, 2))
|
||||||
{
|
{
|
||||||
/* FIXME: we only check the first available pagefile in the reg */
|
/* FIXME: we only check the first available pagefile in the reg */
|
||||||
InitialSize = GetPageFileSizes(pVirtMem->szPagingFiles);
|
GetPageFileSizes(pVirtMem->szPagingFiles,
|
||||||
MaxSize = GetPageFileSizes(pVirtMem->szPagingFiles);
|
&InitialSize,
|
||||||
|
&MaxSize);
|
||||||
|
|
||||||
pVirtMem->Pagefile[PgCnt].InitialValue = InitialSize;
|
pVirtMem->Pagefile[PgCnt].InitialValue = InitialSize;
|
||||||
pVirtMem->Pagefile[PgCnt].MaxValue = MaxSize;
|
pVirtMem->Pagefile[PgCnt].MaxValue = MaxSize;
|
||||||
|
@ -245,7 +262,7 @@ WritePageFileSettings(PVIRTMEM pVirtMem)
|
||||||
static VOID
|
static VOID
|
||||||
SetListBoxColumns(HWND hwndListBox)
|
SetListBoxColumns(HWND hwndListBox)
|
||||||
{
|
{
|
||||||
const INT tabs[2] = {30, 170};
|
const INT tabs[2] = {30, 120};
|
||||||
|
|
||||||
SendMessage(hwndListBox, LB_SETTABSTOPS, (WPARAM)2, (LPARAM)&tabs[0]);
|
SendMessage(hwndListBox, LB_SETTABSTOPS, (WPARAM)2, (LPARAM)&tabs[0]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue