Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1273 closed defect (fixed)

Update to support GetProcessMemoryInfo() on all supported Windows platforms

Reported by: brucedechant Owned by: brucedechant
Priority: medium Milestone: 2.2
Component: Server Version: 2.1.0
Severity: minor Keywords:
Cc: External ID: 1302972

Description

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.

Change History (3)

comment:1 by brucedechant, 15 years ago

External ID: 1302972
Status: newassigned

comment:2 by brucedechant, 15 years ago

Resolution: fixed
Status: assignedclosed

Fixed sandbox/adsk/2.2gp r4605

comment:3 by brucedechant, 15 years ago

Fixed trunk r4606

Note: See TracTickets for help on using tickets.