ATL for Windows CE Overview

The Active Template Library (ATL) for Windows CE is a C++ template library specially designed to help you create small, fast Microsoft® ActiveX® servers. An ActiveX server is a dynamic-link library (DLL) or executable (.exe) that contains one or more Component Object Model (COM) components. These components can be anything from a simple dialog box to a full ActiveX control. The server provides both the components and their associated class factories, which instantiate the components as needed. The server also contains code to register and deregister itself and to let the operating system know when to unload the server from memory.

Because ATL for Windows CE is expressly designed for creating ActiveX controls and other COM components, your ATL components implement only the specific interfaces your project requires. Because of this, the code you create using ATL is smaller, faster, and more efficient than the code you would create by using MFC for an equivalent project.

In addition to providing a range of ActiveX controls, including windowless controls, ATL for Windows CE supports the following COM features.

COM Feature Description
Dual interfaces Interfaces that expose their methods through both direct vtable binding and the IDispatch interface.
Aggregation A condition in which an outer object exposes an inner object's interface. Once the outer object has passed the inner object’s interface to a client object, the client object communicates directly with the inner object.
Connection points An interface on an object that calls an interface that enables it to connect to the object that implements the interface.
Enumerators An object that iterates through a collection of objects of a certain type. Each enumerator support the IEnum* interface that corresponds to the type of object it enumerates.
Tear-off interfaces An interface that is instantiated as a separate object from the object that exposes it. Tear-off interfaces generally are interfaces that are called infrequently.

The ATL for Windows CE Programmer’s Guide contains detailed information about ATL for Windows CE classes, global functions, structures, and sample applications. It also explains the differences between ATL for Windows CE and standard ATL. It does not explain the basic philosophy, structure, or mechanics of ATL or COM because that information is contained in the standard ATL and COM documentation that comes with Visual C++.

ATL for Windows CE 2.10 is designed to be used with the Microsoft® Windows® CE Toolkit for Visual C++®, version 6.0. The toolkit contains all the development tools and wizards for building ATL for Windows CE applications, such as the ATL AppWizard. For information on how to create, test, debug, and run ATL for Windows CE-based applications, see the Programmer’s Guide.