/*
* PROJECT: ReactOS system properties, control panel applet
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: dll/cpl/sysdm/virtual.c
+ * FILE: dll/cpl/sysdm/virtmem.c
* PURPOSE: Virtual memory control dialog
* COPYRIGHT: Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
*
DriveIndex = SendDlgItemMessage(pVirtMem->hSelf,
IDC_PAGEFILELIST,
LB_GETITEMDATA,
- 0,
+ (WPARAM)Index,
0);
/* Check if custom settings are checked */
}
/* Check the valid range of the minimum size */
- if (MinSize < 2 ||
+ if (MinSize < 16 ||
MinSize > pVirtMem->Pagefile[DriveIndex].FreeSize)
{
ResourceMessageBox(hApplet,
/* Check the valid range of the maximum size */
if (MaxSize < MinSize ||
- MaxSize > pVirtMem->Pagefile[DriveIndex].FreeSize)
+ MaxSize > pVirtMem->Pagefile[DriveIndex].FreeSize ||
+ MaxSize > 4095)
{
ResourceMessageBox(hApplet,
NULL,
}
/* Set minimum pagefile size */
- SetDlgItemText(hwndDlg, IDC_MINIMUM, _T("2 MB"));
+ SetDlgItemText(hwndDlg, IDC_MINIMUM, _T("16 MB"));
/* Set recommended pagefile size */
MemoryStatus.dwLength = sizeof(MEMORYSTATUSEX);
static VOID
-OnOk(PVIRTMEM pVirtMem)
+OnVirtMemDialogOk(PVIRTMEM pVirtMem)
{
- if (pVirtMem->bModified == TRUE)
+ if (pVirtMem->bModified != FALSE)
{
ResourceMessageBox(hApplet,
NULL,
static VOID
-OnInitDialog(HWND hwnd, PVIRTMEM pVirtMem)
+OnInitVirtMemDialog(HWND hwnd, PVIRTMEM pVirtMem)
{
INT i;
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pVirtMem);
- OnInitDialog(hwndDlg, pVirtMem);
+ OnInitVirtMemDialog(hwndDlg, pVirtMem);
break;
case WM_DESTROY:
return TRUE;
case IDOK:
- OnOk(pVirtMem);
+ OnVirtMemDialogOk(pVirtMem);
EndDialog(hwndDlg, pVirtMem->bModified);
return TRUE;