views:

93

answers:

2

Visual studio type library

I'm trying from Delphi to open up Visual Studio (for editing SSRS reports), and load up a particular projectitem from a solution file I have autogenerated.

I have imported the visual studio type library, and can create the object, and drill through the solution until I have the right ProjectItem

objDTE := CreateOleObject('VisualStudio.DTE') as DTE;

However I am now at the point where I have the ProjectItem, and want to do the following

_ProjectItem.Open(vsViewKindDesigner);

Unfortunately vsViewKindDesigner is some sort of constant that I can't find a type library for, and it must relate to a particular Guid underneath.

Any ideas where I can import this type library from in order to use this constant in the ProjectItem.Open method?

ProjectItem = interface(IDispatch)
    ['{0B48100A-473E-433C-AB8F-66B9739AB620}']
    .... etc
    function Open(const ViewKind: WideString): Window; safecall;
    .... etc

Thanks!

A: 

Have you looked for that constant in the Visual Studio SDK? MSDN? Google?

See http://social.msdn.microsoft.com/Search/en-US/?Query=vsViewKindDesigner.

John Saunders
+2  A: 

vsViewKindDesigner = {7651A702-06E5-11D1-8EBD-00A0C90F26EA} (Designer view).
source: http://msdn.microsoft.com/en-us/library/aa301250(VS.71).aspx

François
Thank you! I spent hours googling, and couldn't find anything. Thank you very much!
Please consider accepting the answer...
François