Heap32Next function

Retrieves information about the next block of a heap that has been allocated by a process.

Syntax


BOOL WINAPI Heap32Next(
  _Out_  LPHEAPENTRY32 lphe
);

Parameters

lphe [out]

A pointer to a HEAPENTRY32 structure.

Return value

Returns TRUE if information about the next block in the heap has been copied to the buffer or FALSE otherwise. The GetLastError function returns ERROR_NO_MORE_FILES when no more objects in the heap exist and ERROR_INVALID_DATA if the heap appears to be corrupt or is modified during the walk in such a way that Heap32Next cannot continue.

Remarks

To retrieve information for the first block of a heap, use the Heap32First function.

The Heap32Next function does not maintain a reference to the target process. If the target process dies, the system may create a new process using the same process identifier. Therefore, the caller should maintain a reference to the target process as long as it is using Heap32Next.

Examples

For an example, see Traversing the Heap List.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

TlHelp32.h

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Heap Lists and Heap Walking
Heap32First
HEAPENTRY32
Tool Help Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft