I am trying to get all selected items in a solution and this with native code. With native code I am referring to code which does not use the DTE
.
I checked the documentation and tried to find a suitable solution, however I din't come very far. What I found was the IVsUiHierarchy
which contains the ExecCommand
method which contains the following.
Commands that act on a specific item within the hierarchy. (If ItemID equals VSITEMID_SELECTION, the command is applied to the selected item or items.)
So I suspect the method they are talking about, is the before mentioned ExecCommand
one. For one I am not quite sure how I will get to the IVsHierarchy
object from a IVsHierarchy
or similar, on the other hand I am not really sure on how to use the ExecCommand
method properly. Additionally I am not even quite certain, if this is even the 'right way' of approaching this.
Note: I am searching for a solution which does not contain the following code in this answer.