Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
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
}
}