如何从 C++ 检测 PowerPoint 2007 加入?

发布于 2024-07-14 06:09:36 字数 166 浏览 4 评论 0原文

我需要通过我的 C++ 插件检测我的插件是否在 PowerPoint 2007 中。 PowerPoint 对象模型公开了 Application.Version,它应该可以工作,但我不太了解如何将其与 IDispatch 一起使用。

如何从 C++ 插件检测 PowerPoint 2007?

I need to detect if my addin is in PowerPoint 2007 via my C++ addin. The PowerPoint object model exposes Application.Version, which should work, but I do not know enough about how to use this with IDispatch.

How to detect PowerPoint 2007 from a C++ addin?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

后来的我们 2024-07-21 06:09:36

首先 - 调用 IDispatch::GetIDsOfNames 并获取“Version”属性的 id。
之后调用 IDispatch::Invoke 将通过 id 获取版本属性值。

此外,您可以使用 #import 指令生成包装器,并使用更简单的方法来获取此属性的值。

也许这篇文章会对您有所帮助 http://support.microsoft.com/kb/238393 (如何使用 Visual C++ 自动化访问 DocumentProperties)

Firstly - call IDispatch::GetIDsOfNames and get id for "Version" property.
After that call IDispatch::Invoke which will get Version porperty value by id.

Also, you could generate wrappers with #import directive and use more easy methods for get value of this property.

Maybe this article will help you http://support.microsoft.com/kb/238393 (How To Use Visual C++ to Access DocumentProperties with Automation)

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