ICorProfilerInfo2::GetRVAStaticAddress Method
Gets the address of the specified relative virtual address (RVA) static field.
Syntax
HRESULT GetRVAStaticAddress(
[in] ClassID classId,
[in] mdFieldDef fieldToken,
[out] void **ppAddress);
Parameters
classId
[in] The ID of the class that contains the requested RVA-static field.
fieldToken
[in] Metadata token for the requested RVA-static field.
ppAddress
[out] A pointer to the address of the RVA-static field.
Remarks
The GetRVAStaticAddress
method may return one of the following:
A CORPROF_E_DATAINCOMPLETE HRESULT if the given static field has not been assigned an address in the specified context.
The addresses of objects that may be in the garbage collection heap. These addresses may become invalid after garbage collection, so after garbage collection, profilers should not assume that they are valid.
Before a class’s class constructor is completed, GetRVAStaticAddress
will return CORPROF_E_DATAINCOMPLETE for all its static fields, although some of the static fields may already be initialized and may be rooting garbage collection objects.
Requirements
Platforms: See System Requirements.
Header: CorProf.idl, CorProf.h
Library: CorGuids.lib
.NET Framework Versions: Available since 2.0