Share via


ICorDebugThread3::GetActiveInternalFrames Method

Returns an array of internal frames (ICorDebugInternalFrame2 objects) on the stack.

HRESULT GetActiveInternalFrames
      (
      [in] ULONG32 cInternalFrames,
      [out] ULONG32 *pcInternalFrames,
      [in, out,size_is(cInternalFrames), length_is(*pcInternalFrames)]
            ICorDebugInternalFrame2 * ppInternalFrames[]
      );

Parameters

  • cInternalFrames
    [in] The number of internal frames expected in ppInternalFrames.

  • pcInternalFrames
    [out] A pointer to a ULONG32 that contains the number of internal frames on the stack.

  • ppInternalFrames
    [in, out] A pointer to the address of an array of internal frames on the stack.

Return Value

This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.

HRESULT

Description

S_OK

The ICorDebugInternalFrame2 object was successfully created.

E_INVALIDARG

cInternalFrames is not zero and ppInternalFrames is null, or pcInternalFrames is null.

HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)

ppInternalFrames is smaller than the count of internal frames.

Remarks

Internal frames are data structures pushed onto the stack by the runtime to store temporary data.

When you first call GetActiveInternalFrames, you should set the cInternalFrames parameter to 0 (zero), and the ppInternalFrames parameter to null. When GetActiveInternalFrames first returns, pcInternalFrames contains the count of the internal frames on the stack.

GetActiveInternalFrames should then be called a second time. You should pass the proper count (pcInternalFrames) in the cInternalFrames parameter, and specify a pointer to an appropriately sized array in ppInternalFrames.

Use the ICorDebugStackWalk::GetFrame method to return actual stack frames.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: 4

See Also

Other Resources

Debugging Interfaces

Debugging (Unmanaged API Reference)