Author: gedmurphy
Date: Mon Oct 19 08:48:24 2015
New Revision: 69615
URL: http://svn.reactos.org/svn/reactos?rev=69615&view=rev
Log:
[DEVMGR]
Add missing changes files
Modified:
trunk/reactos/dll/win32/devmgr/lang/en-US.rc
trunk/reactos/dll/win32/devmgr/resource.h
Modified: trunk/reactos/dll/win32/devmgr/lang/en-US.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/lang/en-U…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/lang/en-US.rc [iso-8859-1] Mon Oct 19 08:48:24 2015
@@ -268,6 +268,7 @@
BEGIN
IDS_APPNAME "ReactOS Device Manager"
IDS_CONFIRM_DISABLE "Disabling this device will cause it to stop functioning.\r\nDo you really want to disable it?"
+ IDS_CONFIRM_UNINSTALL "Warning: You are about to uninstall this device from your system.\r\nDo you want to continue?"
END
STRINGTABLE DISCARDABLE
BEGIN
Modified: trunk/reactos/dll/win32/devmgr/resource.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/resource.…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/resource.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/resource.h [iso-8859-1] Mon Oct 19 08:48:24 2015
@@ -48,6 +48,7 @@
/* General strings */
#define IDS_CONFIRM_DISABLE 80
+#define IDS_CONFIRM_UNINSTALL 81
/* Menu strings */
#define IDS_MENU_UPDATE 90
Author: hbelusca
Date: Sun Oct 18 22:00:29 2015
New Revision: 69608
URL: http://svn.reactos.org/svn/reactos?rev=69608&view=rev
Log:
[KERNEL32]
- GlobalMemoryStatusEx: Correctly compute ullTotalPageFile which should be in bytes, instead of in number of pages. Patch by contributor "kkat". CORE-10361
- GlobalMemoryStatusEx: Fail if the stored length in the data buffer is not what is expected by the API (required by the spec, see MSDN; on the contrary, GlobalMemoryStatus does not require that.)
- GlobalMemoryStatus: Correctly round up the reported total/available memory values, in case they are bigger than ~= 2GB.
Modified:
trunk/reactos/dll/win32/kernel32/client/heapmem.c
Modified: trunk/reactos/dll/win32/kernel32/client/heapmem.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/heapmem.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/heapmem.c [iso-8859-1] Sun Oct 18 22:00:29 2015
@@ -1276,6 +1276,12 @@
QUOTA_LIMITS QuotaLimits;
ULONGLONG PageFile, PhysicalMemory;
+ if (lpBuffer->dwLength != sizeof(*lpBuffer))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
/* Query performance information */
NtQuerySystemInformation(SystemPerformanceInformation,
&PerformanceInfo,
@@ -1312,6 +1318,7 @@
/* Save the commit limit */
lpBuffer->ullTotalPageFile = min(QuotaLimits.PagefileLimit,
PerformanceInfo.CommitLimit);
+ lpBuffer->ullTotalPageFile *= BaseStaticServerData->SysInfo.PageSize;
/* Calculate how many pages are left */
PageFile = PerformanceInfo.CommitLimit - PerformanceInfo.CommittedPages;
@@ -1327,9 +1334,9 @@
BaseStaticServerData->SysInfo.MinimumUserModeAddress) + 1;
/* And finally the avilable virtual space */
- lpBuffer->ullAvailVirtual = lpBuffer->ullTotalVirtual -
- VmCounters.VirtualSize;
+ lpBuffer->ullAvailVirtual = lpBuffer->ullTotalVirtual - VmCounters.VirtualSize;
lpBuffer->ullAvailExtendedVirtual = 0;
+
return TRUE;
}
@@ -1349,12 +1356,12 @@
/* Reset the right size and fill out the information */
lpBuffer->dwLength = sizeof(MEMORYSTATUS);
lpBuffer->dwMemoryLoad = lpBufferEx.dwMemoryLoad;
- lpBuffer->dwTotalPhys = (SIZE_T)lpBufferEx.ullTotalPhys;
- lpBuffer->dwAvailPhys = (SIZE_T)lpBufferEx.ullAvailPhys;
- lpBuffer->dwTotalPageFile = (SIZE_T)lpBufferEx.ullTotalPageFile;
- lpBuffer->dwAvailPageFile = (SIZE_T)lpBufferEx.ullAvailPageFile;
- lpBuffer->dwTotalVirtual = (SIZE_T)lpBufferEx.ullTotalVirtual;
- lpBuffer->dwAvailVirtual = (SIZE_T)lpBufferEx.ullAvailVirtual;
+ lpBuffer->dwTotalPhys = (SIZE_T)min(lpBufferEx.ullTotalPhys, MAXULONG_PTR);
+ lpBuffer->dwAvailPhys = (SIZE_T)min(lpBufferEx.ullAvailPhys, MAXULONG_PTR);
+ lpBuffer->dwTotalPageFile = (SIZE_T)min(lpBufferEx.ullTotalPageFile, MAXULONG_PTR);
+ lpBuffer->dwAvailPageFile = (SIZE_T)min(lpBufferEx.ullAvailPageFile, MAXULONG_PTR);
+ lpBuffer->dwTotalVirtual = (SIZE_T)min(lpBufferEx.ullTotalVirtual, MAXULONG_PTR);
+ lpBuffer->dwAvailVirtual = (SIZE_T)min(lpBufferEx.ullAvailVirtual, MAXULONG_PTR);
}
}