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

envDTE in unmanaged C++

$
0
0

Hi,

This is my first question within the Microsoft Forums (which are structured differently to what i am used to), so i hope I'm categorizing (and formatting) this correctly :)

I just started working with Visual Studio and envDTE. The (Meta / non-VS) project I'm working on shall be written in C++. As a starting Point i found "How to: Add References to Automation Namespaces" (i was not allowed to link the article), but when i start a new, unmanaged C++ LibraryProject to try it out, the Code sample (without any further code) produces 43 Errors:

#import "libid:80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2" version("8.0") 

Here, IntelliSense tries to open a File named "libid:80...." within the Project Folder

lcid("0") raw_interfaces_only named_guids


For the first appearance this line, 5 Errors are reported:

col1: C4430: missing type specifier

col1: C2440: 'initializing': cannot convert from const char[2] to int

col1: C2146: Syntax error: missing ';' before identifier raw_interfaces_only

col1: IntelliSense: this declaration has no storage class or type specifier

col11: IntelliSense: (same as error C2146)

further appereances Show the error: C2374: redefinition; multiple initialization

I will not continue listing every single error, as obviously something very General is wrong (and the Errors repeat). I will, however, list some Errors that seem to hold interesting further Information:

According to VS there are Errors in the files dte100.tli:

-line 43, 49 and 55: error C2664: 'void _com_issue_errorex(HRESULT,IUnknown *,const IID &)' : cannot convert argument 2 from 'EnvDTE100::Debugger5 *const ' to 'IUnknown *'

and dte100.tlh:

-line 124: error C2504: 'Debugger4': Baseclass undefined

Using C#, I was able to use the corresponding Code Snippet without any Problem.

Can anyone tell me, what I'm doing wrong?

Regards, Sebastian

Edit: I just found out, that the code example has linebreaks, that should not be there. Furthermore I found "Trying to access DTE2 from unmanaged DLL" where one can find out that the Import of dte90a is missing.

I will try to follow the help there for now, but there is no Information about my IntelliSense problem. Therefore, help is still much appreciated.



Edit 2: My IntelliSense problem seems to have been a bug already in VS2010 (ID: 533526) and VS2012 (ID: 779727). The link to the workaround on the report page of 533526 is dead.

Viewing all articles
Browse latest Browse all 4410

Trending Articles



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