Bagikan melalui


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