Using ATL Global Functions and Macros in Windows CE

ATL for Windows CE supports most of the standard ATL global functions but there are a few that aren't relevant to the current implementation of Windows CE.

In Windows CE, you can only use ATL to create in-process servers. Because you can't use it to create executables, ATL for Windows CE doesn't support the RegisterClassObject and RevokeClassObject global functions. There's no need for marshaling in an in-process server, so ATL for Windows CE also doesn't support the AtlFreeMarshalStream, AtlMarshalPtrInProc, or AtlMarshalPtrInProc global functions.

In Windows CE, whenever an application blocks, waiting for a message or some other event, the kernel puts the CPU into low power mode. If an application loops for a long time without blocking, it defeats this power management feature. Because the AtlWaitWithMessageLoop function doesn't block while waiting for the object to be signaled, ATL for Windows CE doesn't support this function.

ATL for Windows CE 2.0 also doesn't support the AtlCreateTargetDC global function. In Windows CE, this function just returns the same device context handle you pass to it.

ATL for Windows CE supports all the macros defined in the standard Active Template Library exactly the same way they're supported on the desktop Windows platforms, except for one. It doesn't support the DECLARE_CLASSFACTORY_AUTOTHREAD macro because Windows CE doesn't support the apartment threading model.

See ATL Macros and Global Functions in the standard ATL documentation for specific information about all the ATL global functions and macros.