Com自动化工厂

发布于 2024-08-29 11:36:56 字数 138 浏览 7 评论 0原文

我尝试在 VB .NET 中使用 ComAutomationFactory 类,我使用的示例是 c# 并且工作正常,但我的项目无法编译并表示该类未定义?

返回类型是什么?在 C# 示例中,它返回一个动态类型,但该类型在 vb .NET 中不存在?

Im trying to use the ComAutomationFactory class in VB .NET the example im working from is c# and is working fine but my project doesnt compile and says this class is not defined??

also what is the return type? in the c# example it returns a type of dynamic but this type does not exist in vb .NET?

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

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

发布评论

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

评论(1

迷离° 2024-09-05 11:36:56

根据此博客,您的示例可能是旧的:

http://silverlight-essentials.blogspot.com/2010/03/breaking-changes-in-com-interop- Between.html

它的名称更改为:

ComAutomationFactory< /code> 已重命名为 AutomationFactory
此外,您还必须引用此类的System.Runtime.InteropServices.Automation

关于返回类型,这个问题的答案有一个解决方案:

在 Silverlight 4 中使用 ComAutomationFactory 迭代 Word 文档字段

Possibly you're sample is old, according to this blog:

http://silverlight-essentials.blogspot.com/2010/03/breaking-changes-in-com-interop-between.html

It's changed name as:

The class ComAutomationFactory has been renamed to AutomationFactory.
Additionally you have to reference System.Runtime.InteropServices.Automation for this class.

Regarding the return type, the answer to this question has a solution:

Iterating over Word Document Fields using ComAutomationFactory in Silverlight 4

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