ICLRDataTarget3::GetExceptionRecord Method

Called by the common language runtime (CLR) data access services to retrieve the exception record associated with the target process. For example, for a dump target, this would be equivalent to the exception record passed in via the ExceptionParam argument to the MiniDumpWriteDump function in the Windows Debug Help Library (DbgHelp).

Syntax

HRESULT GetExceptionRecord(  
    [in] ULONG32 bufferSize,  
    [out] ULONG32* bufferUsed,  
    [out, size_is(bufferSize] BYTE* buffer  
);  

Parameters

bufferSize
[in] The input buffer size, in bytes. This must be equal to sizeof(MINIDUMP_EXCEPTION).

bufferUsed
[out] A pointer to a ULONG32 type that receives the number of bytes actually written to the buffer.

buffer
[out] A pointer to a memory buffer that receives a copy of the exception record. The exception record is returned as a MINIDUMP_EXCEPTION type.

Return Value

The return value is S_OK on success, or a failure HRESULT code on failure. The HRESULT codes can include but are not limited to the following:

Return code Description
S_OK Method succeeded. The exception record has been copied to the output buffer.
HRESULT_FROM_WIN32(ERROR_NOT_FOUND) No exception record is associated with the target.
HRESULT_FROM_WIN32(ERROR_BAD_LENGTH) The input buffer size is not equal to sizeof(MINIDUMP_EXCEPTION).

Remarks

MINIDUMP_EXCEPTION is a structure defined in dbghelp.h and imagehlp.h in the Windows SDK.

This method is implemented by the writer of the debugging application.

Requirements

Platforms: See System Requirements.

Header: ClrData.idl, ClrData.h

Library: CorGuids.lib

.NET Framework Versions: Available since November 2013 update to 4.5.1

See also