ICorProfilerInfo2::GetStaticFieldInfo Method

Gets a value that indicates the kind of static that applies to the specified field.

HRESULT GetStaticFieldInfo (
    [in] ClassID               classId,
    [in] mdFieldDef            fieldToken,
    [out] COR_PRF_STATIC_TYPE  *pFieldInfo);

Parameters

Parameter Description

classId

[in] The ID of the class in which the static field is defined.

fieldToken

[in] The metadata token for the static field.

pFieldInfo

[out] A pointer to a value of the COR_PRF_STATIC_TYPE Enumeration enumeration that indicates whether the specified field is static, and if so, the kind of static that applies to the field.

Remarks

This information can be used to determine which function to call to get the address of the static field.

The profiler code should still check the metadata for a static field to ensure that it actually has an address. Static literals (that is, constants) exist only in the metadata and do not have an address.

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