Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
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 to obtain a metadata 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 contextual information about the use of the function. In this case, pClassId will be 0. Profiler code should use ICorProfilerInfo2::GetFunctionInfo2 with a COR_PRF_FRAME_INFO value to provide more context.
Requirements
Platforms: See .NET Framework System Requirements.
Header: CorProf.idl, CorProf.h
Library: CorGuids.lib
.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0