Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Accessing IVsHierarchy and friends in Dev11 MPF.

$
0
0

The new Dev11 MPF is careful to use the new InteropSafeIVsHierarchy (and other) accessors to marshal interfaces implemented by the ProjectNode.  Presumably this is due to the increased possibility of finding your project system code on a thread other than the main STA -- at least during async build and async project load.

My question is: how far do we need to go in extending this pattern in our existing project systems that need to work in Dev11?  Must we marshal all interop interfaces on the ProjectNode to all calls into a native method?  What about all of the interfaces on HierarchyNode and the node classes that derive from it?

Seems daunting and error prone to have to scour our entire project system for such calls.  I would expect that many native calls into the shell happen along the command route, and so I would expect that perhaps these are already on the main STA and needn't be marshalled.  But, some of what I've seen in the Dev11 MPF makes me concerned that I can make no assumption about the thread on which my code is running and I must always marshal.

Hoping for some prescriptive guidance here. Thanks very much in advance.


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>