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

GetActiveObject to get pDTE when multiple instances started (C++)

$
0
0

Hi!

I'm trying to get DTE object of instance of MS Visual Studio 2010. When there are only one instance I can use this code:

CLSID clsid = {0};
HRESULT res = ::CLSIDFromProgID(L"VisualStudio.DTE.10.0", &clsid);
IUnknownPtr pUnk;
GetActiveObject(clsid, NULL, &pUnk);
_DTEPtr pDTE = pUnk;

But when there are multiple instances of MSVS, it gets DTE of first instance. How can I get table of all running instances and select which DTE to get (I must use C++)?

Sorry for my bad English.


Viewing all articles
Browse latest Browse all 4410

Trending Articles



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