问题
I have a proprietary .NET
DLL which I would like to use in a COM
client.
Currently when I use regasm
it says: warning RA0000 : No types were registered
Since I don't have the source code I can't set the classes to ComVisible
or whatever else is required.
How can I easily make this DLL visible to COM
?
回答1:
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.
Edit: someone seems to have written a generic wrapper:
http://www.codeproject.com/Articles/113720/Universal-COM-Callable-Wrapper
来源:https://stackoverflow.com/questions/14471201/easiest-way-to-make-net-dll-visible-to-com