Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool for creating .NET wrappers for a COM DLL?

Tags:

c#

.net

com

wrapper

Is there any open source tool for automatically generating .NET wrappers for a COM DLL library?

like image 702
Alon Gubkin Avatar asked Jan 22 '10 21:01

Alon Gubkin


People also ask

Which wrapper is useful when .NET client talks to COM?

So, to communicate with a COM component, the COM component should be wrapped in such a way that the.NET client application can understand the COM component. This wrapper is known as Runtime Callable Wrapper (RCW).

What is .NET wrapper?

NET Wrapper provides access to RPC servers for . NET client applications and access to . NET servers for any RPC client.

What is wrapper C#?

A wrapper is a class that takes an instance of another class (the class being wrapped) as an argument in its constructor, which makes it a primitive class of the one being wrapped.


2 Answers

There is no wrapper necessary to use a COM object in .NET. In Visual Studio, right-click your project name in the Solution Explorer, and select "Add Reference." Any registered COM objects will be listed in the COM tab.

Interop wrappers are only necessary when using .NET assemblies as if they were COM objects - not the other way around as you have described in your question.

like image 110
3Dave Avatar answered Sep 17 '22 15:09

3Dave


You can try to use SWIG which is able to generate wrapper code for 18 languages. Also this MSDN article might be useful.

like image 44
tobsen Avatar answered Sep 18 '22 15:09

tobsen