GetMemoryInfo

int GetMemoryInfo (unsigned long *percentLoad, unsigned long *totalPhysical, unsigned long *totalPageFile, unsigned long *totalVirtual, unsigned long *availablePhysical, unsigned long *availablePageFile, unsigned long *availableVirtual);

Purpose

This function determines the size of the Windows operating system's Physical, Page File, and Virtual memory, as well as the portions of each which are available to the calling process.

Parameters

Output
Name Type Description
percentLoad unsigned long * Returns the load on available memory as a percentage. This parameter may be NULL.
totalPhysical unsigned long * Returns the total physical system memory in bytes. This parameter may be NULL.
totalPageFile unsigned long * Returns the total system Page File memory in bytes. This parameter may be NULL.
totalVirtual unsigned long * Returns the total virtual system memory in bytes. This parameter may be NULL.
availablePhysical unsigned long * Returns the available physical system memory in bytes. This parameter may be NULL.
availablePageFile unsigned long * Returns the available Page File size in bytes. This paramater may be NULL.
availableVirtual unsigned long * Returns the available virtual system memory in bytes. This parameter may be NULL.

Return Value

Name Type Description
status integer The status code that the function returns.

0 indicates success.

A negative value indicates an error.

This function may return a Programmer's Toolbox or UI Library error code. Call GetGeneralErrorString to obtain a text description of the error.