Registry Settings for a Desktop Computer

On the desktop computer, you must register the object type to be synchronized and you must also register ActiveSync as an in-process server. For object-type registration, you must enter values under HKEY_LOCAL_MACHINES\Software\Microsoft\Windows CE Services\Services\Synchronization\Objects. The keys under Objects are the object types to be synchronized. For each object type, you must define five values: Default, Display Name, Plural Name, Store, and Disabled.

The Default value can be anything; it is usually a description of the object type. The Display Name and Plural Name are names for the object, for example, "Appointment" and "Appointments." The Store value is the OLE programmatic identifier, ProgID, of the store that implements the IReplStore and IReplObjHandler interfaces. The Disabled value indicates whether the service is shown as disabled or enabled in Windows CE Services. A non-zero value indicates the service is disabled.

Using Schedule+ synchronization as an example, the desktop component is Scdstore.dll. This DLL synchronizes data for five different object types: Appointment, Contact, File, Inbox, and Task. A 32-bit OLE in-process server implements IReplStore and various IReplObjHandler interfaces, one for each object type. The following screen shot illustrates the desktop registry location for synchronization objects.

    

    

Desktop registry structure

You must register ActiveSync for OLE to recognize it as a valid in-process server. To do this, you must register the ProgID, the Class ID, and the GUID under HKEY_CLASSES_ROOT. Register the ProgID under HKEY_CLASSES_ROOT\<ProgID>\Clsid, where the Default value of the Clsid key is the GUID for the store; in this case, it is {a417bc10-7be1-11ce-ad82-00aa006ec559}.

To specify the location of the OLE in-process server, use the following keys: HKEY_CLASSES_ROOT\Clsid\<Class ID>\InProcServer32 and HKEY_CLASSES_ROOT\Clsid\<Class ID>\ProgID. The Default value of the InprocServer32 key is the full path of the 32-bit DLL that implements the IReplStore interface. In the Schedule+ example, this is the path to Scdstore.dll. The Default value of ProgID key is the ProgID of the store. In this example, it is MS.WinCE.Outlook. For more information on registration, see the OLE documentation in the Microsoft Platform SDK.

For another example of the required desktop registry keys, see the Stockpor program in the SDK.