What happens when you add a reference to a COM object from with in a dot net application?

Q

Managed Code and Unmanaged Code related ASP.NET - What happens when you add a reference to a COM object from with in a dot net application?

✍: Guest

A

When you add a reference to a COM object, Visual Studio automatically generates an interop assembly for the object and places it in the project’s /bin folder. The interop assembly is created from the COM object’s type information and contains the metadata that the CLR uses to call the unmanaged code in the COM object. You can then use COM objects from within .NET code the same way that you use .NET classes.
You can view this interop assembly using the Microsoft Intermediate Language Disassembler (Ildasm.exe) included in the .NET Framework.

2009-04-08, 5168👍, 0💬