Freigeben über


ICorProfilerInfo::GetFunctionInfo Method

Gets the parent class and metadata token for the specified function.

HRESULT GetFunctionInfo(
    [in]  FunctionID functionId,
    [out] ClassID    *pClassId,
    [out] ModuleID   *pModuleId,
    [out] mdToken    *pToken);

Parameters

Parameter Description

functionId

[in] The ID of the function for which to get the parent class and metadata token.

pClassId

[out] A pointer to the parent class of the function.

pModuleId

[out] A pointer to the module in which the function's parent class is defined.

pToken

[out] A pointer to the metadata token for the function.

Remarks

The profiler code can call ICorProfilerInfo::GetModuleMetaData Method to obtain a Metadata (Unmanaged API Reference) interface for a given module. The metadata token that is returned to the location referenced by pToken can then be used to access the metadata for the function.

The ClassID of a function on a generic class might not be obtainable without more context about the use of the function. In this case, *pClassId will be 0; profiler code should use ICorProfilerInfo2::GetFunctionInfo2 Method with a COR_PRF_FRAME_INFO value to give more context.

Requirements

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

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0

See Also

Reference

ICorProfilerInfo Interface