Partilhar via


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
);

Parameters

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

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

  • items
    [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.

  • dwReserved
    [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.

Remarks

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.

Important noteImportant Note:

Failure to call EndCustomDump causes memory to leak.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: MSCorEE.idl

Library: Included as a resource in MSCorEE.dll

.NET Framework Version: 2.0

See Also

Concepts

CustomDumpItem Structure

ECustomDumpFlavor Enumeration

ICLRErrorReportingManager Interface