从 Delphi 中自动化 Visual Studio 并启动项目项
Visual studio 类型库
我尝试从 Delphi 打开 Visual Studio(用于编辑 SSRS 报告),并从我自动生成的解决方案文件加载特定项目项。
我已经导入了 Visual Studio 类型库,并且可以创建对象, 并深入研究解决方案,直到获得正确的 ProjectItem
objDTE := CreateOleObject('VisualStudio.DTE') as DTE;
但是我现在已经有了 ProjectItem,并且想要 执行以下
操作 _ProjectItem.Open(vsViewKindDesigner);
不幸的是 vsViewKindDesigner 是某种我不能的常量 找到一个类型库,它必须与下面的特定 Guid 相关。
有什么想法可以从中导入此类型库以便在 ProjectItem.Open 方法中使用此常量吗?
ProjectItem = interface(IDispatch)
['{0B48100A-473E-433C-AB8F-66B9739AB620}']
.... etc
function Open(const ViewKind: WideString): Window; safecall;
.... etc
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
vsViewKindDesigner = {7651A702-06E5-11D1-8EBD-00A0C90F26EA}(设计器视图)。
来源: http://msdn.microsoft.com/en -us/library/aa301250(VS.71).aspx
vsViewKindDesigner = {7651A702-06E5-11D1-8EBD-00A0C90F26EA} (Designer view).
source: http://msdn.microsoft.com/en-us/library/aa301250(VS.71).aspx
您是否在 Visual Studio SDK 中查找过该常量? 微软软件定义网? 谷歌?
请参阅 http://social.msdn.microsoft.com/Search/ en-US/?Query=vsViewKindDesigner。
Have you looked for that constant in the Visual Studio SDK? MSDN? Google?
See http://social.msdn.microsoft.com/Search/en-US/?Query=vsViewKindDesigner.