How is ATL for Windows CE Different from ATL for Desktop Platforms?

The Active Template Library for Windows CE supports most of the features supported by the Active Template Library for desktop Windows platforms. The most significant difference is that ATL for Windows CE only supports the creation of in-process servers. You can't use it to create executables or Windows services.

An in-process server is a DLL that is loaded directly into the address space of the calling process. An out-of-process server is a stand-alone executable that runs in its own address space. Because an in-process server runs in the same address space as its host, it doesn't incur the overhead associated with cross-process marshalling on every call.

Windows CE doesn't support the apartment threading model because it requires more memory resources than the single threading and free threading models, and this conflicts with the memory constraints on many Windows CE-based devices. Part of the overhead of the apartment threading model is its built in marshalling support, which is only necessary when making calls across process boundaries. Because Windows CE only supports in-process servers, it can save both memory and performance overhead by supporting only the single and free threading models.

There are six ATL classes that are supported on desktop Windows platforms that ATL for Windows CE doesn't support. ATL for Windows CE doesn't implement the CComApartment, CComAutoThreadModule, CComClassFactoryAutoThread, or CComSimpleThreadAllocator classes because Windows CE doesn't support the apartment threading model.

Windows CE also doesn't support asynchronous monikers, so ATL for Windows CE doesn't implement the IBindStatusCallbackImpl or CBindStatusCallback classes.

There are also some specific methods in otherwise supported classes that are not implemented in ATL for Windows CE because they relate to features that Windows CE doesn't support. See the following topics for discussions of how these differences affect the way you program in ATL for Windows CE:

Using ATL Global Functions and Macros in Windows CE

Using ATL Classes in Windows CE

What's Different in ATL for Windows CE