ICorDebugThread3::GetActiveInternalFrames 方法

返回堆栈上的内部帧数组(ICorDebugInternalFrame2 对象)。

Syntax

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

参数

cInternalFrames [in]所需的 ppInternalFrames内部帧数。

pcInternalFrames [out]指向包含堆栈上内部帧数的指针 ULONG32

ppInternalFrames [in, out]指向堆栈上内部帧数组的地址的指针。

返回值

此方法返回以下特定的 HRESULT 以及指示方法失败的 HRESULT 错误。

HRESULT Description
S_OK 已成功创建 ICorDebugInternalFrame2 对象。
E_INVALIDARG cInternalFrames不为零,ppInternalFramesnullpcInternalFramesnull
HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) ppInternalFrames 小于内部帧计数。

例外

注解

内部帧是运行时推送到堆栈中的数据结构,用于存储临时数据。

首次调用 GetActiveInternalFrames时,应将 cInternalFrames 参数设置为 0(零),并将 ppInternalFrames 参数设置为 null。 首次返回时 GetActiveInternalFramespcInternalFrames 包含堆栈上内部帧的计数。

GetActiveInternalFrames 然后,应再次调用。 应在参数中cInternalFrames传递正确的计数(pcInternalFrames),并指定指向适当大小的数组的ppInternalFrames指针。

使用 ICorDebugStackWalk::GetFrame 方法可返回实际的堆栈帧。

要求

平台: 请参阅 .NET 支持的作系统

页眉: CorDebug.idl、CorDebug.h

图书馆: CorGuids.lib

.NET 版本: 自 .NET Framework 4.0 起可用