Edit

Share via


IDebugHostField::GetLocation method (dbgmodel.h)

For fields which have an address regardless of the particular type instance (e.g. fields whose ___location kind indicates LocationStatic), the GetLocation method will return the abstract ___location (address) of the field.

If the given field does not have a static ___location, the GetLocation method will fail.

Syntax

HRESULT GetLocation(
  Location *___location
);

Parameters

___location

The abstract ___location (e.g.: address) of the field will be returned here.

Return value

This method returns HRESULT which indicates success or failure.

Remarks

Sample Code*

ComPtr<IDebugHostField> spField; /* get a field symbol (see EnumerateChildren) */

Location fieldLocation;
if (SUCCEEDED(spField->GetLocation(&fieldLocation)))
{
    // For fields which have a static ___location as determined by GetLocationKind, 
    // the ___location of the field will be in fieldLocation.
}

Requirements

Requirement Value
Header dbgmodel.h

See also

IDebugHostField interface