COM is a long-established programming technique that was designed to meet many of the same needs as the .NET runtime.
Although .NET components are the preferred technology for new development, you might need to create or support COM components for existing applications.
ATL makes creating COM components relatively simple, and the #import directive creates smart pointers to help you use those components.
To use a COM component from managed code, create a Runtime-Callable Wrapper by adding a reference on the COM tab.
To use a .NET component from COM code, export the type library, sign the assembly, add it to the GAC, and register the assembly, and then use the #import directive in your COM code.
Mixed assemblies that use the C runtime libraries need special treatment when importing the typelib generated from the assembly.