从 Delphi 中自动化 Visual Studio 并启动项目项

发布于 2024-07-16 02:31:41 字数 680 浏览 10 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

愿与i 2024-07-23 02:31:41

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

囚我心虐我身 2024-07-23 02:31:41

您是否在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文