.NET Interop with COM

For the most part, the CLR inside of .NET shields us from the intricacies and complexities associated with interoperating between the world of legacy COM applications and that of .NET. When making cross-boundary calls, the CLR automatically generates a wrapper for the given client to use, effectively making the call appear as native to the given client, whether it is .NET or COM. In doing so, .NET manages all of the following:

  • Object binding

  • Object identity

  • Marshaling and translation

  • Object life cycle

  • Error and exception handling

Without this support, the task of accessing objects across these very different programming models would be daunting to the average developer. However, by leveraging the services the CLR provides and ...

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.