ABSTRACT

As we saw in the last chapter (if you bothered with it), writing a COM server that supports early binding (aka, a Custom Interface) involves a lot of manual editing. But MFC was really designed as a way to wrap the Win32 API in order to create applications. The Active Template Library (ATL) on the other hand was designed with just one part of the API in mind — that which supports COM. By creating a library of classes that just support COM, you can create smaller and faster COM objects. The examples in this chapter almost mirror those for MFC in the last chapter, and if you compare them you'll find that the wizards and macros and classes in ATL almost make creating a COM object that supports both a custom interface and late binding as easy as creating an MFC class that only supports late binding.