Export (0) Print
Expand All

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);

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 that indicates whether the specified field is static, and if so, the kind of static that applies to the field.

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.

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4.5, 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

Show:
© 2014 Microsoft