tlbimp.exe

Type Library Importer
Reads a COM type library to generate an Interop Assembly that .NET clients can use with early binding.
This can be used to autogenerate Interop Assemblies for Office 2000.
Displays the list of command-line switches for the type library importer tool.


This proxy class (or interop assembly) behaves like a normal .NET assembly and delegates the corresponding functionality to the COM component
There are a number of ways to access / create a runtime callable wrapper
Vendor supplies them (in the case of Microsoft Office) these are known as the primary interop assemblies
Generated automatically using the command line program tlbimp.exe
Using Visual Studio (Add Reference, COM tab and select the COM component) the wrapper DLL will be added to the project



.NET calling COM (RCW)

This tool creates an assembly that contains run-time metadata for the types defined in the original type library
.NET wraps a Runtime callable wrapper (RCW) when you add a reference to a COM dll, the type library is read and the RCW is automatically generated.


The RCW needs to marshal the COM types
The RCW is also called an Interop Assembly.



This allows a COM component to be referenced from .NET
The COM type library is converted into an equivalent .NET assembly



The .NET manifest replaces the COM type library.



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext