IDebugControl3::Evaluate method (dbgeng.h)
The Evaluate method evaluates an expression, returning the result.
Syntax
HRESULT Evaluate(
[in] PCSTR Expression,
[in] ULONG DesiredType,
[out] PDEBUG_VALUE Value,
[out, optional] PULONG RemainderIndex
);
Parameters
[in] Expression
Specifies the expression to be evaluated.
[in] DesiredType
Specifies the desired return type. Possible values are described in DEBUG_VALUE; with the addition of DEBUG_VALUE_INVALID, which indicates that the return type should be the expression's natural type.
[out] Value
Receives the value of the expression.
[out, optional] RemainderIndex
Receives the index of the first character of the expression not used in the evaluation. If RemainderIndex is NULL, this information isn't returned.
Return value
This method may also return other error values. See Return Values for more details.
Return code | Description |
---|---|
|
The method was successful. |
|
An error occurred while evaluating the expression. For example, there was a syntax error, an undefined variable, or a division by zero exception. |
Remarks
Expressions are evaluated by the current expression evaluator. The engine contains multiple expression evaluators; each supports a different syntax. The current expression evaluator can be chosen by using SetExpressionSyntax.
For details of the available expression evaluators and their syntaxes, see Numerical Expression Syntax.
If an error occurs while evaluating the expression, returning E_FAIL, the RemainderIndex variable can be used to determine approximately where in the expression the error occurred.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | dbgeng.h (include Dbgeng.h) |