Muistiinpano
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää kirjautua sisään tai vaihtaa hakemistoa.
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää vaihtaa hakemistoa.
Retrieves the value of a constant.
Syntax
HRESULT get_value (
VARIANT* pRetVal
);
Parameters
pRetVal
[in, out] A VARIANT object that is filled in with the value of a constant.
Return Value
If successful, returns S_OK; otherwise, returns S_FALSE or an error code.
Note
A return value of S_FALSE means the property is not available for the symbol.
Remarks
The supplied VARIANT must be initialized before it is passed to this method. For more information, see the example.
Example
void ProcessValue(IDiaSymbol *pSymbol)
{
VARIANT value;
VariantInit(&value); // Initialize variant for use.
if (pSymbol->get_value(&value) == S_OK)
{
// Do something with value.
}
}
//----------------------------------------------------
// Alternate approach
void ProcessValue2(IDiaSymbol *pSymbol)
{
CComVariant value;
if (pSymbol->get_value(&value) == S_OK)
{
// Do something with value
}
}