Com自动化工厂
我尝试在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据此博客,您的示例可能是旧的:
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 toAutomationFactory
.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