Share via

IDkmCustomVisualizer Interface


This interface is implemented by custom expression evaluator visualizers in order to customize the view of an expression programmatically. This is normally done to support visualizations that are not possible using the native visualizer syntax or to enable visualization without full symbolic information. The visualizer can take complete control of the expression including expansion of children, or it can obtain the default expression from the expression evaluator, modify it slightly but defer other operations such as expansion back to the EE.

Implementations of this interface may restrict when they are called using a filter defined in their component configuration. The following properties may be used: EngineId, RuntimeId, SourceId, SymbolProviderId, VisualizerId.

public interface class IDkmCustomVisualizer
public interface class IDkmCustomVisualizer
__interface IDkmCustomVisualizer
public interface IDkmCustomVisualizer
type IDkmCustomVisualizer = interface
Public Interface IDkmCustomVisualizer


EvaluateVisualizedExpression(DkmVisualizedExpression, DkmEvaluationResult)

Evaluate a visualized expression returning a DkmEvaluationResult for it.

GetChildren(DkmVisualizedExpression, Int32, DkmInspectionContext, DkmChildVisualizedExpression[], DkmEvaluationResultEnumContext)

Gets an enumeration context used to obtain the children of this evaluation result. This is used in all expression evaluation windows.

GetItems(DkmVisualizedExpression, DkmEvaluationResultEnumContext, Int32, Int32, DkmChildVisualizedExpression[])

Called to obtain items from a instance of DkmEvaluationResultEnumContext created by an earlier call to GetChildren.


This method is used for evaluation results that include DkmEvaluationResultFlags.RawString to obtain the the underlying string, with no enclosing quotes or escape sequences. This is method is invoked to display one of the various string visualizers in an expression evaluation window (click the magnifying glass icon).

SetValueAsString(DkmVisualizedExpression, String, Int32, String)

Modifies the value of the given evaluation result (assumed to be non-read-only) to match the given string. This is used after the user edits a value in any of the evaluation windows.

UseDefaultEvaluationBehavior(DkmVisualizedExpression, Boolean, DkmEvaluationResult)

Called by the expression evaluator when a visualized expression's children are being expanded, the the value is being set, or the underlying string is being obtained. If the visualizer addin wants complete control of the expression it should return false. It will then receive calls to GetChildren, GetItems, SetValueAsString, and GetUnderlyingString. If the visualizer addin wants to completely defer these operations to the expression evaluator, it should return true. It must also give the expression evaluator back the instance of DkmEvaluationResult that came from the EE via one of the IDkmCustomVisualizerCallback methods. Note that the addin MUST have obtained the default DkmEvaluationResult from the EE if it wants the EE to control the object. Returning true from this method is primarily used by visualizer addins that just tweak something small like the view of a value but don't want to modify expansion or setting values.

Applies to