DkmInspectionContext.EvaluateExpression Method

Definition

Bind the input expression and evaluate it. Then format the resulting value for display in the debugger. This is used for data tips, the watch windows, the immediate window, etc.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

Location constraint: IDE components may call this method regardless of what type of code is being debugged. This method is also currently supported for debug monitor components, when debugging code running under the CLR; however this functionality may be removed in a future version.

public:
 void EvaluateExpression(Microsoft::VisualStudio::Debugger::DkmWorkList ^ WorkList, Microsoft::VisualStudio::Debugger::Evaluation::DkmLanguageExpression ^ Expression, Microsoft::VisualStudio::Debugger::CallStack::DkmStackWalkFrame ^ StackFrame, Microsoft::VisualStudio::Debugger::DkmCompletionRoutine<Microsoft::VisualStudio::Debugger::Evaluation::DkmEvaluateExpressionAsyncResult> ^ CompletionRoutine);
public void EvaluateExpression (Microsoft.VisualStudio.Debugger.DkmWorkList WorkList, Microsoft.VisualStudio.Debugger.Evaluation.DkmLanguageExpression Expression, Microsoft.VisualStudio.Debugger.CallStack.DkmStackWalkFrame StackFrame, Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.Evaluation.DkmEvaluateExpressionAsyncResult> CompletionRoutine);
member this.EvaluateExpression : Microsoft.VisualStudio.Debugger.DkmWorkList * Microsoft.VisualStudio.Debugger.Evaluation.DkmLanguageExpression * Microsoft.VisualStudio.Debugger.CallStack.DkmStackWalkFrame * Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.Evaluation.DkmEvaluateExpressionAsyncResult> -> unit
Public Sub EvaluateExpression (WorkList As DkmWorkList, Expression As DkmLanguageExpression, StackFrame As DkmStackWalkFrame, CompletionRoutine As DkmCompletionRoutine(Of DkmEvaluateExpressionAsyncResult))

Parameters

WorkList
DkmWorkList

WorkList to append the new work item to.

Expression
DkmLanguageExpression

[In] DkmLanguageExpression represents an expression to be parsed and evaluated by an expression evaluator.

StackFrame
DkmStackWalkFrame

[In] Stack frame to evaluate the expression in.

CompletionRoutine
DkmCompletionRoutine<DkmEvaluateExpressionAsyncResult>

Routine to fire when the request is complete. If the request is successfully appended to the work list, this will always fire (including when the operation is canceled). This will never fire if appending the work item fails.

Applies to