MZ-Tools Articles Series: HOWTO: Navigate the files of a solution using the IVsHierarchy interface from an add-in.

Continuing with the use of the native IVsHierarchy interface when using add-ins, if in my last article I showed how to get the IVsHierarchy and Item Id of EnvDTE.Project and EnvDTE.ProjectItem, in this new one I show how to navigate the Solution Explorer using that interface instead of the automation model:

HOWTO: Navigate the files of a solution using the IVsHierarchy interface from an add-in.
http://www.mztools.com/articles/2014/MZ2014007.aspx

As you can see in the sample code, the use of that interface is quite complicated because nodes are identified by unsigned 32-bit integers, but when you ask the ids of child or sibling nodes, you can get signed 32-bit integers and even IntPtr values in some cases. You have the documentation here.