Share via


What's New with ATL and MFC (Windows Embedded CE 6.0)

1/5/2010

Windows Embedded CE 6.0 introduces a new release of the Advanced Template Library (ATL). Previous versions of Windows Embedded CE supported ATL4.0; Windows Embedded CE 6.0 and later support ATL 8.0. The new version of the template library is compiled using the most recent version of the Windows Embedded CE compiler.

ATL/MFC 4.0 is now deprecated. MFC has been removed, and ATL 4.0 is replaced by ATL 8.0. However, backward compatibility is preserved as much as possible; if an incompatible construction is used, ATL will return a message about that use, but not crash.

Migration guidelines

The following list provides general guidelines for migrating an OS project transition to ATL 8.0.

  • Remove any unused build variables:
    • WINCEATL
    • USE_ATL
    • ATL_VER
    • USE_STATIC_ATL
  • Replace the WINCEATL30=1 environment variable with WINCEATL80=1 in the Sources file.
  • Update the code to use the newer alternatives.
    - OR -
    If no other alternatives are available, eliminate deprecated warnings by adding /D_ATL_DISABLE_DEPRECATED to CDEFINES in the sources file.
  • Replace occurrences of the CComModule class with an appropriate substitute, as specified in CComModule Replacement Classes
  • Replace use of FreeResource. This function is a no-op on Win32, and no longer available in ATL
  • Avoid any hard-coded paths that refer to ATL.
  • Always use WINCEATL80 and ATL8LIBS*
    • If a sysgen’ed project must link against ATL, add $(ATL8LIBS) to the TARGETLIBS section in the project makefile.
    • If a sysgen’ed project must link against ATL debug version, use $(ATL8LIBD).
    • If a non sysgen’ed project built directly from the SOURCES must link against ATL, use $(S_ATL8LIBS)
    • If a non sysgen’ed project built directly from the SOURCES must link against ATL debug, use $(S_ATL8LIBSD).
    • Remove any explicit ATL include path from the INCLUDES variable
  • Add fully qualified path names as needed to occurrences of the following functions. Note that this list is not exhaustive.

See Also

Reference

CComModule Replacement Classes

Other Resources

C/C++ Libraries for Windows Embedded CE