Ticket #1273 (closed defect: fixed)
Update to support GetProcessMemoryInfo() on all supported Windows platforms
|Reported by:||brucedechant||Owned by:||brucedechant|
Microsoft made a change to the GetProcessMemoryInfo API which is used by the MapGuide GetSiteInfo HTTP API.
The following is from MSDN: http://msdn.microsoft.com/en-us/library/ms683219(VS.85).aspx
Starting with Windows 7 and Windows Server 2008 R2, Psapi.h establishes version numbers for the PSAPI functions. The PSAPI version number affects the name used to call the function and the library that a program must load.
If PSAPI_VERSION is 2 or greater, this function is defined as K32GetProcessMemoryInfo in Psapi.h and exported in Kernel32.lib and Kernel32.dll. If PSAPI_VERSION is 1, this function is defined as GetProcessMemoryInfo in Psapi.h and exported in Psapi.lib and Psapi.dll as a wrapper that calls K32GetProcessMemoryInfo.
Programs that must run on earlier versions of Windows as well as Windows 7 and later versions should always call this function as GetProcessMemoryInfo. To ensure correct resolution of symbols, add Psapi.lib to the TARGETLIBS macro and compile the program with –DPSAPI_VERSION=1. To use run-time dynamic linking, load Psapi.dll.