ICorDebugThread2::GetActiveFunctions 方法ICorDebugThread2::GetActiveFunctions Method

获取有关此线程的每个帧中的活动函数的信息。Gets information about the active function in each of this thread's frames.

语法Syntax

HRESULT GetActiveFunctions (  
    [in]   ULONG32             cFunctions,  
    [out]  ULONG32             *pcFunctions,  
    [in, out, size_is(cFunctions), length_is(*pcFunctions)]  
        COR_ACTIVE_FUNCTION    pFunctions[]  
);  

参数Parameters

cFunctions
[in] pFunctions 数组的大小。[in] The size of the pFunctions array.

pcFunctions
弄一个指针,它指向数组中返回的对象的数目 pFunctions[out] A pointer to the number of objects returned in the pFunctions array. 返回的对象数将等于堆栈上托管帧的数目。The number of objects returned will be equal to the number of managed frames on the stack.

pFunctions
[in,out]COR_ACTIVE_FUNCTION 对象的数组,其中每个对象都包含有关此线程的帧中的活动函数的信息。[in, out] An array of COR_ACTIVE_FUNCTION objects, each of which contains information about the active functions in this thread's frames.

第一个元素将用于叶帧,并回到堆栈的根目录。The first element will be used for the leaf frame, and so on back to the root of the stack.

备注Remarks

如果 pFunctions 在输入时为 null,则 GetActiveFunctions 仅返回堆栈上的函数数目。If pFunctions is null on input, GetActiveFunctions returns only the number of functions that are on the stack. 也就是说,如果在 pFunctions 输入时为 null,则 GetActiveFunctions 仅返回中的值 pcFunctionsThat is, If pFunctions is null on input, GetActiveFunctions returns a value only in pcFunctions.

GetActiveFunctions方法旨在优化堆栈跟踪中的帧获取相同的信息,并且仅包含在完整堆栈跟踪中具有 ICorDebugILFrame 对象的帧。The GetActiveFunctions method is intended as an optimization over getting the same information from frames in a stack trace, and includes only frames that would have had an ICorDebugILFrame object for them in the full stack trace.

要求Requirements

平台: 请参阅系统要求Platforms: See System Requirements.

标头:CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h

库: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 2.0 之后可用Available since 2.0.NET Framework Versions: 自 2.0 之后可用Available since 2.0