Advanced COM Interoperability
The .NET framework is a natural progression from COM because the two models share many central themes, including component reuse and language neutrality. For backward compatibility, COM interop provides access to existing COM components without requiring that the original component be modified. You can incorporate COM components into a .NET Framework application by using COM interop tools to import the relevant COM types. Once imported, the COM types are ready to use.
COM interop also introduces forward compatibility by enabling your COM clients to access managed code as easily as they access other COM objects. Again, COM interop provides the means to seamlessly export metadata in an assembly to a type library and registers the managed component as a traditional COM component. Both the import and export utilities produce results consistent with COM specifications. At run time, the common language runtime marshals data between COM objects and managed objects as needed.
In This Section
- Advanced COM Interoperability How-to Topics
Provides links to all How-to topics found in the conceptual documentation for advanced COM interoperability.
- COM Wrappers
Describes the wrappers provided by COM interop.
- Primary Interop Assemblies
Describes how to create and use primary interop assemblies.
- Side-By-Side Execution for COM Interop
Describes how to safely share components through COM interop services.
- Registration-Free COM Interop
Describes how COM interop can activate components without using the Windows registry.
- Safe Handles and Critical Finalization
Describes classes used to safely wrap unmanaged handles in managed code.
- Inheritance, Aggregation, and Containment
Describes various strategies for extending COM types.
- Managed and Unmanaged Threading
Describes the threading differences that impact interoperation.
- Managed and Unmanaged Events
Describes how to raise and handle events using COM interop.
- Type Library to Assembly Conversion Summary
Describes the type library to assembly import conversion process.
- Assembly to Type Library Conversion Summary
Describes the assembly to type library export conversion process.
- Custom Marshaling
Describes the process for writing a custom marshaler for interoperation.
Related Sections
- Design Considerations for Interoperation
Provides design-time considerations that can enhance the transition between managed and unmanaged code.
- Exposing COM Components to the .NET Framework
Describes how to expose an existing COM component to managed code.
- Exposing .NET Framework Components to COM
Describes how to expose managed code to an existing COM component.
- Interop Marshaling
Describes the process that governs how data is passed between managed and unmanaged code.