Partilhar via


ICorProfilerInfo2::GetClassIDInfo2 Method

Gets the parent module and metadata token of the specified generic class, the ClassID of its parent class, and the ClassID for each type argument, if present, of the class.

HRESULT GetClassIDInfo2(
    [in] ClassID classId,
    [out] ModuleID *pModuleId,
    [out] mdTypeDef *pTypeDefToken,
    [out] ClassID *pParentClassId,
    [in] ULONG32 cNumTypeArgs,
    [out] ULONG32 *pcNumTypeArgs,
    [out] ClassID typeArgs[]);

Parameters

Parameter Description

classId

[in] The ID of the class for which information will be retrieved.

pModuleId

[out] Pointer to the ID of the parent module of the class.

pTypeDefToken

[out] Pointer to the metadata token for the class.

pParentClassId

[out] Pointer to the ID of the parent class.

cNumTypeArgs

[in] The size of the typeArgs array.

pcNumTypeArgs

[out] Pointer to the number of elements returned in the typeArgs array.

typeArgs

[out] An array of ClassID values, each of which represents the ID of a type argument of the class.

Remarks

The GetClassIDInfo2 method is similar to the ICorProfilerInfo::GetClassIDInfo Method method, but GetClassIDInfo2 gets additional information about a generic type.

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 pTypeDefToken can then be used to access the metadata for the class.

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
ICorProfilerInfo2 Interface