first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

MCAD/MCSD Notes: Chapter 7, Lesson 3; Interoperating with COM

Lesson 3: Interoperating with COM

The purpose of this lesson is to expand upon the backwards-compatibility feature set of .NET to include COM "interop." This lesson makes explicit the relationship .NET has with legacy technologies like VB6. It may help to mention that COM stands for component object model, where the word "component" often indicates the physical boundary in which properties and procedures reside (effectively, this means a .DLL file).

This assembly can be viewed with Intermediate Language Disassembler (ILDASM.exe). For more information, see "VS.NET Tools: Intermediate Language Disassembler(ILDASM)" at:

http://www.c-sharpcorner.com/vsnet/IldasmTool.asp

This looks like yet another very subtle difference between VB.NET and C#.

One could argue that ASP.NET applications are already interoperable with COM by default since Internet Information Server must still have COM interfaces at least up to version 6.0.

One design pattern shown in the lesson sets the entire assembly to 'hidden' with:

[assembly: ComVisible(false)]

so that members can "opt in" to COM visibility.

Managed exceptions under COM are mapped to the appropriate HRESULT and vice versa.

This limitation stands out foremost for managed code running under COM among the lack of support for construtors with parameters and "shadow" members not being callable.

mod date: 2005-07-29T20:14:34.000Z