本文介绍了COM互操作问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个COM服务器,我根据书中的信息写了 ..NET和COM /完整的Interop指南。我已经把这个项目编译成了b $ b编译,我找到了我想要运行的regasm.exe程序 对我的dll来生成一个TLB文件为了将COM对象导入其他编程语言(如Delphi)。 然而,当我尝试将类型库导入Delphi时我用其他组件完成了数百次,我在 mscorlib_tlb文件中发现构建错误,该文件表明Type Byte未完全定义 以及字节的OLE自动化部分中的非法类型。 任何人都可以告诉我这里发生了什么以及如何解决它,因为书中说 没问题。 谢谢, glenn 解决方案 您可以发布您的代码(或部分),以及regasm.exe命令行使用参数吗? br /> 不确定mscorlib_tlb来自哪里,这是Delphi生成的类型库吗? 你试过cre吃了一个实例并从一个简单的方法调用一个方法 vb / Jscript? Willy。 I have a COM Server that I''ve written based on information from the book..NET and COM / the complete Interop Guide. I have gotten the project tocompile and I''ve located the regasm.exe program that I was suppose to runagainst my dll in order to generate a TLB file for the purposes of importingthe COM object into other programming lanugages such as Delphi.However, when I try to import the type library into Delphi which I have donehundreds of times with other components, I get build errors in themscorlib_tlb file that states that the Type Byte is not completely definedas well as Illegal type in OLE automation section for Byte.Can anyone tell me what is happening here and how to fix it as the book saysnothing of the issue.thanks,glenn 解决方案Could you post your code (or part of), and the regasm.exe command linearguments used?Not sure where mscorlib_tlb comes from, is this a Delphi generated typelib?Did you try to create an instance and call a method from a simplevb/Jscript?Willy. 这篇关于COM互操作问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-22 21:03