问题描述
我有一个专有的 .NET
DLL,我想在一个 COM
客户端使用。
I have a proprietary .NET
DLL which I would like to use in a COM
client.
目前,当我使用 regasm
它说:警告RA0000:无类型登记
Currently when I use regasm
it says: warning RA0000 : No types were registered
由于我没有源$ C $ C我不能设置类标记有ComVisible特性
或任何其他要求。
Since I don't have the source code I can't set the classes to ComVisible
or whatever else is required.
我怎么能轻松使这个DLL看到 COM
?
How can I easily make this DLL visible to COM
?
推荐答案
您需要写一个COM调用包装。这里有几个链接:
You need to write a "COM callable wrapper". Here are a few links:
http://msdn.microsoft.com/en-us/library/ ms973802.aspx
http://msdn.microsoft.com/en-us/library/ f07c8z1c.aspx
http://edn.embarcadero.com/article/32754
其中有些是很老,但我想象中的原则保持不变。
Some of these are quite old, but I imagine the principles have remained the same.
编辑:有人似乎已经写了一个通用的包装:
someone seems to have written a generic wrapper:
HTTP://www.$c$cproject。 COM /用品/ 113720 /通用-COM可调用封装器
这篇关于最容易的.NET的DLL COM可见的方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!