IDebugHostField::GetValue 方法 (dbgmodel.h)
對於在符號資訊中定義常數值的欄位(例如:位置種類指出LocationConstant的欄位),GetValue 方法會傳回欄位的常數值。
如果指定的欄位沒有常數值,GetValue 方法將會失敗。
語法
HRESULT GetValue(
VARIANT *value
);
參數
value
包裝至 VARIANT 的欄位值將會在這裡傳回。
傳回值
此方法會傳回 HRESULT,指出成功或失敗。
言論
範例程式代碼
ComPtr<IDebugHostField> spField; /* get a field (see EnumerateChildren) */
VARIANT vtValue;
if (SUCCEEDED(spField->GetValue(&vtValue)))
{
// For fields which have a constant value as determined by GetLocationKind,
// vtValue will contain the value of the field.
VariantClear(&vtValue);
}
要求
要求 | 價值 |
---|---|
標頭 | dbgmodel.h |