Windows CE 5.0: Comparing Workspaces

Windows CE 5.0

Mike Hall

March 2006

Applies to:
   Microsoft Windows CE version 5.0

Summary: Learn how to: Compare the features used in two Platform Builder workspaces and determine the delta between an initial Windows CE template and a platform workspace, and use the GetDBInfo utility to get the GUID/SYSGEN information you'll need to determine what's been added/removed from your workspace file.


Compare Two Platform Workspaces
Compare a Base Platform Configuration with Your Existing Workspace
Use the GetDBInfo Utility to Determine the Delta between a Platform Template and a Platform Workspace


Windows CE ships with approximately 600 operating system components which are exposed through the Windows CE Catalog, if you are an integrated development environment (IDE) user; or through command line environment variables, if you prefer to work at the command line.

Windows CE gives you a number of starting point platform configurations which can jumpstart your embedded design, these really are starting points for a design, you can further customize the platform by either removing features you don't need, or by adding additional features from the Catalog.

But, here's the thing, let's assume that you've been working on a project for a while, and for this example, say the design is based on the "Internet Appliance" platform configuration. You may have added or removed a number of Catalog items, but there's nothing in Platform Builder to show you the delta from the original platform, or to compare two platform workspaces. These are of course completely separate issues which we will explore one at a time.

Let's first take a look at comparing two platforms.

Compare Two Platform Workspaces

In this example, the platform is based on the Internet Application configuration.

  1. In Platform Builder, click Edit, and then click New Platform to start the New Platform Wizard.
  2. Create a platform called MyPlatform.
  3. On the Build OS menu, click Open Release Directory.
  4. Get a listing of all of the currently set Sysgen variables using the command set sysgen.

The Sysgen variable list will look like this:

C:\WINCE500\PBWorkspaces\MyPlatform\RelDir\Emulator_x86_Debug>set sysgen


  1. Pipe the Sysgen variable list to a text file.
  2. Open a second workspace, open a build window.
  3. Pipe the Sysgen variable list to another text file.
  4. Use a tool like WinDiff to compare the files.
  5. Go back to Platform Builder and add the Sysgens variables. On the Platform menu, click Settings, and then click the Environment Variable tab.
Tip You can also right-click on the Catalog and type the name of a Sysgen variable or component to find it.

Compare a Base Platform Configuration with Your Existing Workspace

To determine the components included in a base Windows CE operating system image, we can examine one of the Windows CE template files and determine the feature names from the Custom_Device.xml file.

The design templates for Windows CE 5.0 can be found in C:\WINCE500\PUBLIC\COMMON\OAK\CATALOG\NEWPLATFORMWIZARDS (assuming a default install of Windows CE 5.0).

The templates are simply XML files that can be broken down into two logical parts, operating system components, which are known as "DefaultSettings," and optional components.

Following is an extract from the Internet Appliance Platform Wizard XML file showing the DefaultSettings block within the XML file, which defines the fixed operating system components that are expected to be in the operating system image. (Note that a number of GUIDs have been removed from the example.)

    <Component IncludeComponent="0246E582-3544-446B-8F7B-8FAA0C399410" />
    <Component IncludeComponent="271CFC2D-D13D-4931-8349-C4B549EAD1E3" />
    <Component IncludeComponent="3DB27231-B662-46B2-9A20-BCDB9672F10B" />
    <Component IncludeComponent="C79B8B9A-2FA9-4A14-89FD-843DD3361DC3" />
    <Component IncludeComponent="8AE70F33-3B0C-4F59-AFB8-637CE51613C5" />
    <Component IncludeComponent="9429FF7D-40E0-4169-8523-FF7DB19CDE0C" />
    <Component IncludeComponent="D341D78A-48D4-4957-82EC-C4EB296BC6F8" />

To determine which component a GUID represents:

For this example, we'll determine the component that the bolded GUID above represents.

  1. From the NEWPLATFORMWIZARDS folder, open the Custom_Device.xml in Notepad or other editor. (This wizard file wraps all the components found in the Catalog.)
  2. Search on the GUID and find the following item:
<Name>Standard Shell</Name>
        <Description>Standard Shell</Description>
        <Component IncludeComponent="8AE70F33-3B0C-4F59-AFB8-637CE51613C5" />

The component from the Platform Wizard file is the Windows CE Standard Shell.

The second part of the Platform XML file is the optional section. Each wizard starts with a base set of components (the shell for example) and then prompts the user to select optional components, for example, the .NET Compact Framework.

To determine the GUID of a component:

Search the Custom_Device.xml file for ".NET Compact Framework 1.0" and find the following:

        <Name>.NET Compact Framework 1.0</Name>
        <Description>.NET Compact Framework 1.0</Description>
        <Component IncludeComponent="272A74B5-989A-4361-9FE2-6C35063A373B" />

Now go back to the Internet Appliance design template XML file and locate the NETCF 1.0 GUID. You now understand how to map a component from the Catalog to a GUID within a Windows CE platform XML template file.

After the DefaultSettings section of the XML File there are typically one or more Selection Pages, these translate to wizard dialog boxes you see on screen when running the Platform Builder New Platform Wizard. In the section below, we can see the Selection Page for Applications and Media, this includes the .NET Compact Framework 1.0 component (highlighted).

    <Title>Applications &amp; Media</Title>
    <Comment>Select items for applications and media to include in your OS design.</Comment>
    <Description>Select items for applications and media to include in your OS design.</Description>
      <Option OptionDefault="YES">
        <Name>.NET Compact Framework</Name>
        <Description>Support for applications and services designed for the .NET Compact Framework.</Description>
        <Component IncludeComponent="C57F5E2B-DCD5-4D00-8C8B-7EAC20ADA502" />
        <Component IncludeComponent="272A74B5-989A-4361-9FE2-6C35063A373B" />
        <Name>Standard SDK for Windows CE</Name>
        <Description>A minimum standard set of APIs. A software development kit (SDK) created from an OS design that contains this set of APIs qualifies as a Windows CE Standard SDK.</Description>
        <Component IncludeComponent="C0159835-AD47-41C9-A473-7AA85EF01D8D" />

Now compare this to your Platform Builder workspace. Workspaces are typically stored in the C:\WINCE500\PBWorkspaces folder.

We'll use the MyPlatform workspace (that we generated at the start of this article) XML file as our example: C:\WINCE500\PBWorkspaces\MyPlatform\MyPlatform.pbxml

The list of features used in a platform workspace is exposed through an XML section in the platform workspace file called FeatureCollection. This is an abbreviated version of MyPlatform FeatureCollection.

  <FeatureCollection Name="AnchoredFeatures" EnforceUniqueItems="True">
    <Feature Name="Item" FeatureVariable="SYSGEN_HELP" Anchored="True" />
    <Feature Name="Item" FeatureVariable="SYSGEN_IABASE" Anchored="True" />
    <Feature Name="Item" FeatureVariable="SYSGEN_STANDARDSHELL" Anchored="True" />
    <Feature Name="Item" FeatureVariable="SYSGEN_DOTNETV2" Anchored="True" />

To map the SYSGENS from the PBPXML file back to the IncludeComponent GUID in the default platform XML file, you can use the GetDBInfo utility.

Use the GetDBInfo Utility to Determine the Delta between a Platform Template and a Platform Workspace

The GUID/IncludeComponent map is contained in a password secured Access Database (.mdb) file: C:\WINCE500\PUBLIC\COMMON\OAK\CATALOG\DATABASE\pbdb.mdb

Use GetDBInfo utility to open the .mdb file and extract the relevant information. (Note that this is written in Visual Studio 2005, so you will need the .NET Framework 2.0 to run the application).

The GetDBInfo application creates an XML file that lists all components that have a valid GUID and SYSGEN, and their Windows CE Catalog (.cec) file. The following is a screenshot of the running application.


Figure 1. GetDBInfo application running

This is how the XML that's generated by the GetDBInfo application looks; we can clearly see the component GUIDs, the title of the component, the SYSGEN variable associated with the component, and the .cec file that is associated with the component.


Figure 2. Examining the GetDBInfo XML content

Now we have all of the pieces of the puzzle needed to determine the delta between a Platform Builder workspace (in this paper we've created a MyPlatform workspace) and the original Platform Builder Wizard configuration. It would be fairly simple to write an application that parses the XML file generated by GetDBInfo, asks the user to choose a Platform Wizard workspace, and then displays the delta between the wizard and the platform.

Oh, nearly forgot... I was going to talk about the .NET Compact Framework, why? Because the .NET Compact Framework v2.0 has recently been released, this updates the Catalog through the installation of a new .cec file, so the GUID for this component (or any other third-party component) won't be found in the Custom_Device.xml file. If you're going to write an application that determines feature differences between a wizard configuration and a Platform Workspace, then you will need to be aware of new components that update the Windows CE Platform Builder Catalog.


Following is a summary of the exercises provided in this article:

  • Compared Two Platform Workspaces
  • Compared a base platform configuration with your existing workspace
  • Used the GetDBInfo Utility to determine the delta between a platform template and a platform workspace