ICLRErrorReportingManager::BeginCustomDump Method

Specifies the configuration of custom heap dumps for error reporting.


HRESULT BeginCustomDump (  
    [in] ECustomDumpFlavor dwFlavor,  
    [in] DWORD dwNumItems,  
    [in, size_is(dwNumItems), length_is(dwNumItems)] CustomDumpItem items[],  
    DWORD dwReserved  


[in] A ECustomDumpFlavor value that indicates the kind of heap dump upon which to build the custom heap dump.

[in] The length of the items array. If dwFlavor is not DUMP_FLAVOR_Mini, dwNumItems should be zero.

[in] An array of CustomDumpItem instances, specifying the items to add to the mini-dump. If dwFlavor is not DUMP_FLAVOR_Mini, items should be null.

[in] Reserved for future use.

Return Value

HRESULT Description
S_OK The method returned successfully.
HOST_E_CLRNOTAVAILABLE The common language runtime (CLR) has not been loaded into a process, or the CLR is in a state in which it cannot run managed code or process the call successfully.
HOST_E_TIMEOUT The call timed out.
HOST_E_NOT_OWNER The caller does not own the lock.
HOST_E_ABANDONED An event was canceled while a blocked thread or fiber was waiting on it.
E_FAIL An unknown catastrophic failure occurred. After a method returns E_FAIL, the CLR is no longer usable within the process. Subsequent calls to hosting methods return HOST_E_CLRNOTAVAILABLE.


The BeginCustomDump method sets custom heap dump configuration. The EndCustomDump method clears the custom heap dump configuration and frees any associated state. It should be called after the custom heap dump is complete.


Failure to call EndCustomDump causes memory to leak.


Platforms: See System Requirements.

Header: MSCorEE.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 2.0

See Also

CustomDumpItem Structure
ECustomDumpFlavor Enumeration
ICLRErrorReportingManager Interface