Freigeben über


Configuring the ActiveSync COM Components (Windows CE 5.0)

Send Feedback

The ActiveSync COM components must be correctly registered for the ActiveSync manager to recognize an ActiveSync service provider.

The desktop COM component requires a unique programmatic identifier (ProgId). For example, the ProgId for the Microsoft Outlook ActiveSync service provider is "MS.WinCE.Outlook." The identifier is arbitrary, and can have any value that does not duplicate another ProgId.

The service provider requires a newly generated GUID (or CLSID).

Once the ProgId and GUID have been created, the following keys are added to the desktop's Windows registry to register the service provider.

HKEY_CLASSES_ROOT\Clsid\classID\InProcServer32

HKEY_CLASSES_ROOT\Clsid\classID\ProgID

HKEY_CLASSES_ROOT\ProgID\CLSID

The default value of the InprocServer32 key is the path of the DLL that implements the IReplStore interface. For Microsoft Outlook it would be the full path to Outstore.dll. The default value of the ProgID key is MS.WinCE.Outlook. The CLSID is used by CoCreateInstance to create instances of the store interfaces.

After the service provider is registered, each object type it synchronizes is registered under HKEY_LOCAL_MACHINE. The following example registers the object types Appointment, Contact, and Task.

HKEY_LOCAL_MACHINE
    Software
        Microsoft
              Windows CE Services
                   Services
                        Synchronization
                             Objects
                                  Appointment
                                  Contact
                                  Task

Each object-type name is a key. Each key's default, Display Name, Plural Name, Store, and Disabled values are defined under the key. The appointment object type in the Microsoft Outlook example has the following values.

[Default]     "Outlook Appointment Object"
Display Name  "Appointment"
Plural Name   "Appointments"
Store         "MS.WinCE.Outlook"
Disabled      0
DefaultIcon   "C:\Program Files\ActiveSync\outstore.dll,-131"

Default is a descriptive name of the synchronization object. Display Name and Plural Names are text displayed in user interfaces. Store is the name of the ProgId of the ActiveSync service provider. Disabled controls whether synching this object type is disabled by default (disabled = 1). DefaultIcon specifies the icon used by ActiveSync manager for this object type.

When a new Windows CE-based device is connected to the desktop and a new ActiveSync partnership created, the HKEY_LOCAL_MACHINE keys for synchronization objects are used as a template for the partnership. The partnership information for a Windows CE-based device is stored in HKEY_CURRENT_USER. In this example, Appointment, Contact, and Tasks are registered in the following way.

HKEY_CURRENT_USER
    Software
         Microsoft
              Windows CE Services
                   Partners
                        <Windows CE-based device ID>
                             Services
                                  Synchronization
                                       Objects
                                            Appointment
                                            Contact
                                            Tasks

ActiveSync automatically copies the provider's registry settings from HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER.

Registration on the Windows CE-based device is similar but simpler. All that is needed is to register the ActiveSync device COM component under HKEY_LOCAL_MACHINE. The following is the registration for the Microsoft Outlook example.

HKEY_LOCAL_MACHINE
    Windows CE Services
         Synchronization
              Objects
                   Appointment
                   Contact
                   Tasks

Again, each object type name is a key, but only Store and Display Name are defined. For the Appointment object type in the example, the following is defined.

Store "pegobj.dll"
Display Name "Appointment"

Here, Store refers to the DLL that exports the functions for this object type. Display Name is the same as it was for the desktop registration under HKEY_LOCAL_MACHINE.

See Also

Implementing the Desktop Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.