INF: Using TOOLHELP to Determine Free System Resources

ID Number: Q76247

3.10

WINDOWS

Summary:

In Windows version 3.1, a Windows application can obtain the amount of

free system resources in two ways:

1. By calling the GetFreeSystemResources function, which is exported

by KERNEL

2. By calling the SystemHeapInfo function, which is exported by the

TOOLHELP.DLL dynamic-link library

Under Windows 3.0, the GetFreeSystemResources function is not

available. If TOOLHELP.DLL is present, a Windows 3.0 application can

use SystemHeapInfo. If TOOLHELP.DLL is not present, there is no

supported method for a Windows 3.0 application to obtain the amount of

free system resources.

More Information:

The second prerelease of Windows 3.1 does not implement the

GetFreeSystemResources function. This function should be implemented

before the third prerelease is shipped.

The version of TOOLHELP.DLL included with the second prerelease of

Windows 3.1 does not implement the SystemHeapInfo function. This

function should be implemented before the third prerelease is shipped.

The version of TOOLHELP.DLL included with the second prerelease does

contain two functions for obtaining the current amount of free system

resources: UserHeapInfo and GDIHeapInfo. The THSAMPLE sample

application included with the second prerelease of the Windows

Software Development Kit version 3.1 shows how to use these calls. In

the third prerelease, these two functions will be replaced by the

single function, SystemHeapInfo.

Additional reference words: 3.00 3.10 pre-release