#include <toolhelp.h> |
BOOL GlobalNext(lpge, flags) | |||||
GLOBALENTRY FAR* lpge; | /* address of structure for object | */ | |||
WORD flags; | /* heap to use, */ |
The GlobalNext function fills the specified structure with information that describes the next object on the global heap.
lpge
Points to a GLOBALENTRY structure that receives information about the global memory object. The GLOBALENTRY structure has the following form:
#include <toolhelp.h>
typedef struct tagGLOBALENTRY { /* ge */
DWORD dwSize;
DWORD dwAddress;
DWORD dwBlockSize;
HGLOBAL hBlock;
WORD wcLock;
WORD wcPageLock;
WORD wFlags;
BOOL wHeapPresent;
HGLOBAL hOwner;
WORD wType;
WORD wData;
DWORD dwNext;
DWORD dwNextAlt;
} GLOBALENTRY;
For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.
flags
Specifies heap to use. This parameter can be one of the following values:
Value | Meaning |
GLOBAL_ALL | Structure pointed by the lpge parameter will receive information about the first object on the complete global heap. |
GLOBAL_FREE | Structure will receive information about the first object on the free list. |
GLOBAL_LRU | Structure will receive information about the first object on the least-recently-used (LRU) list. |
The return value is nonzero if the function is successful. Otherwise, it is zero.
The GlobalNext function can be used to continue a global heap walk started by the GlobalFirst, GlobalEntryHandle, or GlobalEntryModule functions.
If GlobalFirst starts a heap walk, the flags value used in GlobalNext must be the same as the value used in GlobalFirst.
GlobalEntryHandle, GlobalEntryModule, GlobalFirst, GlobalInfo