Interop tools
Tools to support a COM component using a .NET assembly
The .NET Framework creates a type library and special registry entries when a component is registered. It provides a specialized utility (RegAsm.exe
, usually located in C:\Windows\Microsoft.NET\Framework
) that exports the managed types into a type library and registers the managed component as a traditional COM component. When the type is instantiated through COM, the .NET CLR is the actual COM object that executes, and it merely marshals any method calls or property access to the type implementation.
Registration-free COM can be used to avoid DLL hell.
Tools to support a .NET assembly using a COM component
A COM Interop for an existing COM component can be created through the use of theTlbimp.exe
tool supplied with the .NET Framework SDK. This tool will create a set of proxy classes implemented in CIL which is encapsulated in an assembly.
Details
COM interop automatically provides the following services to simplify COM usage from .NET: *Conversion between COM types and equivalent .NET types. *Translation ofretval
arguments into return values.
*Translation of HRESULT return values into exceptions.
References
External links