DkmNativeCppInspectionSession.CompileExpression Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compiles a given expression into native IL.
Location constraint: API must be called from an IDE component (component level > 100,000).
This API was introduced in Visual Studio 14 Update 2 (DkmApiVersion.VS14Update2).
public:
Microsoft::VisualStudio::Debugger::Native::Cpp::DkmCompiledNativeCppExpression ^ CompileExpression(Microsoft::VisualStudio::Debugger::Evaluation::DkmEvaluationFlags EvaluationFlags, Microsoft::VisualStudio::Debugger::DkmRuntimeInstance ^ RuntimeInstance, Microsoft::VisualStudio::Debugger::Native::Cpp::DkmNativeCppType ^ TypeContext, bool IsThisPointerAvailable, Microsoft::VisualStudio::Debugger::DkmInstructionAddress ^ InstructionAddress, System::String ^ Text, System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::VisualStudio::Debugger::Native::Cpp::DkmNativeCppNamedExpressionParameter ^> ^ Parameters, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Debugger::Native::Cpp::DkmNativeCppCompilationError ^ % Error);
public Microsoft.VisualStudio.Debugger.Native.Cpp.DkmCompiledNativeCppExpression CompileExpression (Microsoft.VisualStudio.Debugger.Evaluation.DkmEvaluationFlags EvaluationFlags, Microsoft.VisualStudio.Debugger.DkmRuntimeInstance RuntimeInstance, Microsoft.VisualStudio.Debugger.Native.Cpp.DkmNativeCppType TypeContext, bool IsThisPointerAvailable, Microsoft.VisualStudio.Debugger.DkmInstructionAddress InstructionAddress, string Text, System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Debugger.Native.Cpp.DkmNativeCppNamedExpressionParameter> Parameters, out Microsoft.VisualStudio.Debugger.Native.Cpp.DkmNativeCppCompilationError Error);
public Microsoft.VisualStudio.Debugger.Native.Cpp.DkmCompiledNativeCppExpression? CompileExpression (Microsoft.VisualStudio.Debugger.Evaluation.DkmEvaluationFlags EvaluationFlags, Microsoft.VisualStudio.Debugger.DkmRuntimeInstance RuntimeInstance, Microsoft.VisualStudio.Debugger.Native.Cpp.DkmNativeCppType? TypeContext, bool IsThisPointerAvailable, Microsoft.VisualStudio.Debugger.DkmInstructionAddress InstructionAddress, string Text, System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Debugger.Native.Cpp.DkmNativeCppNamedExpressionParameter>? Parameters, out Microsoft.VisualStudio.Debugger.Native.Cpp.DkmNativeCppCompilationError? Error);
member this.CompileExpression : Microsoft.VisualStudio.Debugger.Evaluation.DkmEvaluationFlags * Microsoft.VisualStudio.Debugger.DkmRuntimeInstance * Microsoft.VisualStudio.Debugger.Native.Cpp.DkmNativeCppType * bool * Microsoft.VisualStudio.Debugger.DkmInstructionAddress * string * System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Debugger.Native.Cpp.DkmNativeCppNamedExpressionParameter> * DkmNativeCppCompilationError -> Microsoft.VisualStudio.Debugger.Native.Cpp.DkmCompiledNativeCppExpression
Public Function CompileExpression (EvaluationFlags As DkmEvaluationFlags, RuntimeInstance As DkmRuntimeInstance, TypeContext As DkmNativeCppType, IsThisPointerAvailable As Boolean, InstructionAddress As DkmInstructionAddress, Text As String, Parameters As ReadOnlyCollection(Of DkmNativeCppNamedExpressionParameter), ByRef Error As DkmNativeCppCompilationError) As DkmCompiledNativeCppExpression
Parameters
- EvaluationFlags
- DkmEvaluationFlags
[In] Flags which effect how an input expression should be parsed, compiled or displayed.
- RuntimeInstance
- DkmRuntimeInstance
[In] The DkmRuntimeInstance class represents an execution environment which is loaded into a DkmProcess and which contains code to be debugged.
- TypeContext
- DkmNativeCppType
[In,Optional] Optional type specifying the context in which to evaluate the expression. If non-null, the expression text may use the 'this' pointer to bind to an instance of this type.
- IsThisPointerAvailable
- Boolean
[In] True if a 'this' pointer is available to evaluate the expression. The generated IL will expect the 'this' pointer to be passed in as the first IL parameter, which will come before any named parameters. The type of the 'this' pointer should be be a pointer to the type indicated in the 'TypeContext' parameter. If no 'this' pointer is available, 'IsThisPointerAvailable' should be set to false. In this case, the resultant IL will not expect a 'this' pointer, but expression will be restricted to global and static members only. 'IsThisPointerAvailable' should always be false whenever 'TypeContext' is NULL.
- InstructionAddress
- DkmInstructionAddress
[In] The instruction address at which the resultant query will execute. This may affect the content of the returned inspection query in optimized code debugging scenarios.
- Text
- String
[In] The expression to compile.
[In,Optional] Optional list of named parameters available for use in the expression.
[Out,Optional] If the expression failed to compile, specifies the reason for the failure.
Returns
[Out,Optional] Result of compiling the expression.