DkmCustomMessage Class

Definition

Message structure used to pass information between custom debugger backend components and custom visual studio UI components (packages, add-ins, etc).

public ref class DkmCustomMessage
[Windows::Foundation::Metadata::WebHostHidden]
public ref class DkmCustomMessage
[Windows::Foundation::Metadata::WebHostHidden]
class DkmCustomMessage
[System.Runtime.InteropServices.Guid("d308a6ed-8e21-e7dd-abfa-9ae22434f9bc")]
public class DkmCustomMessage
[<System.Runtime.InteropServices.Guid("d308a6ed-8e21-e7dd-abfa-9ae22434f9bc")>]
type DkmCustomMessage = class
Public Class DkmCustomMessage
Inheritance
DkmCustomMessage
Attributes

Properties

Connection

[Optional] Transport connection used to send the message.

MessageCode

Identifies the type of custom event being sent. Partners are free to define any set of values.

Parameter1

[Optional] Specifies additional message-specific information. Note that if this message may need to travel over remoting boundaries, it is important to restrict the type of this parameter to something which can be marshalled: strings, primitives (ex: int), and arrays of primitives (ex: byte array).

Parameter2

[Optional] Specifies additional message-specific information. Note that if this message may need to travel over remoting boundaries, it is important to restrict the type of this parameter to something which can be marshalled: strings, primitives (ex: int), and arrays of primitives (ex: byte array).

Parameter3

[Optional] Specifies additional message-specific information. Note that if this message may need to travel over remoting boundaries, it is important to restrict the type of this parameter to something which can be marshalled: strings, primitives (ex: int), and arrays of primitives (ex: byte array).

This API was introduced in Visual Studio 15 RTM (DkmApiVersion.VS15RTM).

Process

[Optional] DkmProcess represents a target process which is being debugged. The debugger debugs processes, so this is the basic unit of debugging. A DkmProcess can represent a system process or a virtual process such as minidumps.

SourceId

Identifies the source of an object. SourceIds are used to enable filtering in scenarios when multiple components may be creating instances of a class. For example, source ids can be used to determine if a breakpoint comes from the AD7 AL (ex: user breakpoint, or other breakpoint visible at the SDM level) instead of a breakpoint which may be created by another component (for example an internal breakpoint used for stepping).

WorkerProcess

[Optional] If non-null, this specifies the worker process connection that the message should be sent through.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTMPreview).

Methods

Create(DkmTransportConnection, DkmProcess, Guid, Int32, Object, Object)

Create a new DkmCustomMessage object instance.

Create(DkmTransportConnection, DkmProcess, Guid, Int32, Object, Object, Object)

Create a new DkmCustomMessage object instance.

This API was introduced in Visual Studio 15 RTM (DkmApiVersion.VS15RTM).

Create(DkmTransportConnection, DkmProcess, Guid, Int32, Object, Object, Object, DkmWorkerProcessConnection)

Create a new DkmCustomMessage object instance.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTMPreview).

OnCustomStop(DkmThread, Guid)

Raises a CustomStop event to a VS service which is expecting it. Note that there are restrictions on the type for parameters to this custom message. See DkmCustomMessage.SendToVsService for more information.

SendHigher()

Sends a message to a listening component which is higher in the hierarchy.

SendLower()

Sends a message to a listening component which is lower in the hierarchy.

SendLower(DkmWorkList, DkmCompletionRoutine<DkmSendLowerAsyncResult>)

Sends a message to a listening component which is lower in the hierarchy.

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.

SendToVsService(Guid, Boolean)

Sends a custom message to a Visual Studio package. This can be used, for example, to drive a custom UI or make a custom UI visible by enabling a command context (IVsMonitorSelection.SetCmdUIContext).

For local 32-bit debugging, the custom message parameters (DkmCustomMessage.Parameter1/2), may contain any value (ex: object/IUnknown, string, etc), however, values are transferred between threads without marshalling, so in cases where this will not work, the sender is responsible for converting the parameter into a form which can be used from the VS service (ex: calling ole32!CoMarshalInterThreadInterfaceInStream).

For remote debugging, and 64-bit debugging, the custom message parameters are marshalled across machines, and so the restrictions describe in the DkmCustomMessage.Parameter1 documentation applies.

Applies to