Registering the Service Provider Module

For Windows CE Services to recognize a service provider, you must create valid registry entries in the registry on both the Windows-based desktop computer and on the Windows CE–based device. You also must register the object types.

Note The CEUTIL utility DLL functions are especially helpful when adding desktop registry entries for Windows CE. For more information, see  "Installing and Managing Applications."

    To register a service provider on the Windows-based desktop computer

  1. Provide a programmatic identifier (ProgID) for the desktop provider module.

    The ProgID must be a unique name.

  2. Generate a GUID (Class ID) for the service provider.
  3. Create the following keys in the Windows registry:

    HKEY_CLASSES_ROOT\CLSID\Class ID\InProcServer32

    HKEY_CLASSES_ROOT\CLSID\Class ID\ProgID

    HKEY_CLASSES_ROOT\ProgID\CLSID

The default value of the InProcServer32 key is the full path of the 32-bit DLL that implements the IReplStore interface (for example, for Microsoft Outlook the path is Outstore.dll); the default value of the ProgID key is MS.WinCE.Outlook; and the default value of the CLSID key is the GUID for the store.

After registering the service provider, you must register each object type that the service provider synchronizes. Register the object types in a subdirectory under HKEY_LOCAL_MACHINE. The following screen shot illustrates the desktop registry location for the appointment, contact, and task object types.

Each object type name is a key. Under each key, you must define the following five values:

The following screen shot illustrates the values defined under the Appointment object type.

Whenever a user connects a new device to the desktop and a new device profile is added to Mobile Device folder, the registry keys for the synchronization objects under HKEY_LOCAL_MACHINE are automatically copied to HKEY_CURRENT_USER.

    To register a service provider on the Windows CE–based device

On the device, each object type name is a key, but you only define two values: Store and Display Name. Store refers to the module that exports the functions for this object type, and Display Name refers to the name of the object type.

The following registry data shows the device registration for the Appointment object type that was explained above.

Store    "pegobj.dll"
Display Name    "Appointment"