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

Translate C# code to C++

$
0
0

I have a VSPackage project written in C# working.  I have to call to some native C++ libraries so I have a few layers of shims to get it to work.  I just noticed that a VSPackage can be written in C++ using COM and the ATL.

I have the following section of C# code that I can't figure out how to convert to C++.  I finally figured out how to get the DTE2 interface (#include <dte80.h>), but I don't know how I am supposed to create the instance and make sure it is for the current instance of Visual Studio (multiple may be running).  Do I use CoCreateInstance or some other method?  As for the ErrorListProvider, I have not idea how to create that.

I would appreciate any suggestions on how to proceed with this.

         var errorListProvider = new ErrorListProvider(this);
         var dte = (EnvDTE80.DTE2)GetService(typeof(EnvDTE.DTE));

Viewing all articles
Browse latest Browse all 4410

Trending Articles



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