Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 2.58 KB

icordebugprocess5-enumerateheap-method.md

File metadata and controls

56 lines (41 loc) · 2.58 KB
description title ms.date api_name api_location api_type f1_keywords helpviewer_keywords ms.assetid topic_type
Learn more about: ICorDebugProcess5::EnumerateHeap Method
ICorDebugProcess5::EnumerateHeap Method
03/30/2017
ICorDebugProcess5.EnumerateHeap
mscordbi.dll
COM
ICorDebugProcess5::EnumerateHeap
EnumerateHeap method, ICorDebugProcess5 interface [.NET Framework debugging]
ICorDebugProcess5::EnumerateHeap method [.NET Framework debugging]
b0192104-6073-4089-a4df-dc29ee033074
apiref

ICorDebugProcess5::EnumerateHeap Method

Gets an enumerator for the objects on the managed heap.

Syntax

HRESULT EnumerateHeap(  
    [out] ICorDebugHeapEnum **ppObjects  
);  

Parameters

ppObject
[out] A pointer to the address of an ICorDebugHeapEnum interface object that is an enumerator for the objects that reside on the managed heap.

Remarks

Before calling the ICorDebugProcess5::EnumerateHeap method, you should call the ICorDebugProcess5::GetGCHeapInformation method and examine the value of the areGCStructuresValid field of the returned COR_HEAPINFO object to ensure that the garbage collection heap in its current state is enumerable. In addition, the ICorDebugProcess5::EnumerateHeap returns E_FAIL if you attach too early in the lifetime of the process, before memory for the managed heap is allocated.

The ICorDebugHeapEnum interface object is a standard enumerator derived from the ICorDebugEnum interface that allows you to enumerate COR_HEAPOBJECT objects. This method populates the ICorDebugHeapEnum collection object with COR_HEAPOBJECT instances that provide information about all objects. The collection may also include COR_HEAPOBJECT instances that provide information about objects that are not rooted by any object but have not yet been collected by the garbage collector.

Requirements

Platforms: See System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: [!INCLUDEnet_current_v45plus]

See also