GlobalInfo

3.1

  #include <toolhelp.h>    

  BOOL GlobalInfo(lpgi)    
  GLOBALINFO FAR* lpgi; /* address of global-heap structure */

The GlobalInfo function fills the specified structure with information that describes the global heap.

Parameters

lpgi

Points to a GLOBALINFO structure that receives information about the global heap. The GLOBALINFO structure has the following form:

#include <toolhelp.h>

typedef struct tagGLOBALINFO {  /* gi */
    DWORD dwSize;
    WORD  wcItems;
    WORD  wcItemsFree;
    WORD  wcItemsLRU;
} GLOBALINFO;

For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.

Return Value

The return value is nonzero if the function successful. Otherwise, it is zero.

Comments

The information in the structure can be used to determine how much memory to allocate for a global heap walk.

Before calling the GlobalInfo function, an application must initialize the GLOBALINFO structure and specify its size, in bytes, in the dwSize member.

See Also

GlobalEntryHandle, GlobalEntryModule, GlobalFirst, GlobalNext