Calling .NET Code from COM

It is likely that companies and programmers will eventually have enough code that COM-based clients will be calling .NET servers. I can imagine scenarios where individual programmers sneak in .NET parts as a bridge to the future for companies slow to switch to .NET or so they can use highly prized third-party solutions available only in .NET. Calling .NET from COM is supported by COM Interop. In this section, to be thorough, I included an example of .NET to COM Interop relationship, including the preparatory steps necessary to make the mechanics work.

Recall that metadata was incorporated in .NET assemblies to mitigate “DLL hell.” This metadata consists of an assembly manifest that provides information about types and ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.