IDebugHostConstant::GetValue method (dbgmodel.h)

The GetValue method returns the value of the constant packed into a VARIANT.

It is important to note that the GetType method on IDebugHostSymbol may return a specific type symbol for the constant. In such cases, there is no guarantee that the packing of the constant value as defined by the type symbol is the same as the packing as returned by the GetValue method here.

Syntax

HRESULT GetValue(
  VARIANT *value
);

Parameters

value

The value of the data packed into a VARIANT will be returned here.

Return value

This method returns HRESULT that indicates success or failure.

Remarks

Sample Code

ComPtr<IDebugHostConstant> spConstant; /* get a constant */

VARIANT vtValue;
if (SUCCEEDED(spConstant->GetValue(&vtValue)))
{
    // vtValue contains the value of the constant.  The variant type of vtValue 
    // may not match what the type indicates if you get the type of the symbol.
    VariantClear(&vtValue);
}

Requirements

Requirement Value
Header dbgmodel.h

See also

IDebugHostConstant interface