首先,我是 COM 新手,目前很困惑.我在 MSDN 和一般网络上阅读了很多关于 COM 的文档,但其中很多似乎已经过时且过于复杂.
First off, I am new to COM, and currently quite confused. I've read a lot of documentation on COM on MSDN and the general web, but a lot of it seems outdated and overly complex.
这是我认为让它发挥作用所必需的.它还没有,所以我确定我遗漏了一些东西,但是通过提供我的食谱,我希望有人能发现问题:
Here's what I believe to be necessary to get it to work. It doesn't yet, so I am sure I am missing something, but by giving my recipe, I hope someone can spot the problem:
感谢答案,我更新了问题以反映综合解决方案.
Thanks to the answers, I updated the question to reflect the combined solution.
尝试以下步骤:
C:WindowsSysWOW64
egsvr32.exe c:full-pathComLib.Interop.dll
C:WindowsSysWOW64
egsvr32.exe c:full-pathComLib.Interop.dll
看看你能不能达到 7.我认为这应该可行.
See if you get to 7. I think that should work.
请注意,您只需要在开发机器上进行注册.独立的 COM 应该可以在其他任何地方工作.
Note you only need the registration on the Development machine. Isolated COM should work everywhere else.
这篇关于如何在 Visual Studio 2012 中创建 HelloWorld COM 互操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!