Closed igadmg closed 4 years ago
If you have a Visual Studio package (or similar IDE side extension) you can create a custom message object (DkmCustomMessage.Create) and send it to a Concord component using DkmCustomMessage.SendLower.
Ok, so i can use Concord class from my VSIX? Good, but DkmCustomMessage.Create need at least DkmTransportConnection, how can i get it from VSIX package? DkmTransportConnection.FindConnection need a connection Guid, I can probably send it from active debugger, but maybe there is easier way to get it?
Looks like local debugger connections all have the same Guid 'DkmTransportKind.Local'. So DkmTransportConnection.FindConnection(DkmTransportKind.Local) is the way to get it?
Or maybe current connection is exposed somewhere in Vs Shell api's and I should use them?
I found, DkmTransportConnection.GetConnections(), so i can enum all connections.
Thanks, @gregg-miskelly
There are a couple of different options depending on what you are trying to do --
it is stated in documentation that IDkmCustomMessageForwardReceiver can be "Implemented by components that want to receive custom messages from the IDE". Can you provide and example hot send message from Visual Studio? Or at least which function should be used for this?