|
Home
About
Discussion
Recent Discussion
Create New Topic
Membership
Join Now
Login
|
Creating new sys.memInfo verb
Designed to expose more details about Frontier memory for Windows machines. Works identically to sys.memAvail on Macintosh.
In kernelverbs.rc, added meminfo to /*idsysverbs*/ as:
"unixshellcommand\0", "winshellcommand\0", /* 2006-03-09 aradke */ "meminfo\0" /* 2009-05-30 dgewirtz */
Changed verb count in same resource from 16 to 17 as in:
1013 /*idsysverbs*/ EFP DISCARDABLE BEGIN 1, //Number of "blocks" in this resource "sys\0", //Function Processor Name false, //Window required 17, //Count of verbs "osversion\0", /*sys*/
Added a new Windows API call into WinBase.h (located it right after the GlobalMemoryStatusEx definition):
typedef struct _PERFORMANCE_INFORMATION { DWORD cb; SIZE_T CommitTotal; SIZE_T CommitLimit; SIZE_T CommitPeak; SIZE_T PhysicalTotal; SIZE_T PhysicalAvailable; SIZE_T SystemCache; SIZE_T KernelTotal; SIZE_T KernelPaged; SIZE_T KernelNonpaged; SIZE_T PageSize; DWORD HandleCount; DWORD ProcessCount; DWORD ThreadCount; } PERFORMANCE_INFORMATION, *PPERFORMANCE_INFORMATION;
WINBASEAPI BOOL WINAPI GetPerformanceInfo( __out PPERFORMANCE_INFORMATION pPerformanceInformation, __in DWORD cb );
In VC2K8, in the menu Project->Frontier Properties..., in the Linker tree, in the Input node, added psapi.dll to the additional dependencies. Also added it to the Release configuration.
|