Hi and thanks for the post.
So, if I'm understanding you right, you have an environment variable named "CePlatform" that you've created and you want to use it to do some sort of pre-processing within the code.
To do this, checkout the sources file in the directory of the code you are building.
Within a sources file, you can do something like the following:
!if "$(CePlatform)" == "foo"
CDEFINES=$(CDEFINES) -DFOO=1
!endif
That would basically be the equivalent of:
#define FOO (1)
Which you can then take advantage of in your code such as:
#if ( 1 == FOO )
/* compile something */
#elif ( 2 == FOO )
/* compile something else */
#else
#error "Error, foo isn't defined, please check the environment variable $(CePlatform)"
If you want this to propagate to code stored in several directories, use a
sources.cmn file such as the one found in: x:\WINCE420\PLATFORM\LoCE_A400_rel_100
You can also search the Platform builder help for sources.cmn for more information on the syntax and usage of that particular file. Or, just look through all of the examples.
As far as setting the environment variable, use project.bat or the project settings dialog box within Platform Builder.
Best regards,
--mikee