Every Windows CE device has a file named CEConfig.h in the \Windows folder. This file can be used to conditionally compile code against different projects or SDKs. It can also be used to determine the license level of a Windows CE OS.
CEConfig.h is created when a Windows CE OS project is built, or more specifically sysgened, using Platform Builder. CEConfig.h contains macro definitions for the OS components included in the project. In other words, it can tell the C code about the features that will be available at runtime.
For example, some Windows CE OS’s include ToolHelpAPI, which is a collection of functions that can be used to gather information at runtime. But ToolHelpAPI is optional and if you write your application to depend on it, your application will fail at runtime. If the OS includes ToolHelpAPI, then CEConfig.h will contain:
So your code can check for this:
#include <ceconfig.h>
#include "tlhelp32.h"
CEConfig.h can also be used to determine the license level of the OS. Microsoft provides a License Tool that reads CEConfig.h and outputs the license level of the OS.  This tool can be downloaded from Microsoft® Windows® CE 5.0 Run-time Assessment Tool for Windows CE 5.0 and for Windows CE 6.0 it is installed in Visual Studio’s Tools menu when you install Platform Builder.
Copyright © 2008 – Bruce Eitman
All Rights Reserved