Creating the ActiveSync Service Provider (Windows CE 5.0)
ActiveSync provides ActiveSync service providers for common applications and data types.
|Provider Name||Desktop Provider||Desktop Provider Base Address||Device Provider||Supported Object Types|
|Windows CE File Synchronization||cefstore.dll||0x23000000||cefobj.dll||File|
|Mobile Channels Synchronization||aafstore.dll||0x24000000||aafobj.dll||Channel|
Service provider support for other types of data is written by OEM or third-party developers. Although this requires some programming effort, it also assures that any application or data type can be supported. This and the following sections explain the steps required to create custom service providers.
Before writing an ActiveSync service provider, you must define the object, object type, and object identifier, as well as the folder and store that will hold the object. You must also decide how you will determine whether two objects are identical, and whether an object has changed.
The code you write is contained in interfaces and methods whose names and parameters have already been defined — the desktop provider and the device provider.
The desktop provider handles the bulk of communication with the service manager and implements two COM interfaces.
|IReplStore:IUnknown||Enumerates objects in a store, checks for changes in an object, and displays a user interface so the user can set synchronization options and resolve conflicts.|
|IReplObjHandler:IUnknown||Serializes/deserializes data, and deletes objects.|
The device provider implements the same IReplObjHandler interface as the desktop provider, plus the following functions.
|InitObjType||Initializes data and returns a pointer to the IReplObjHandler interface when the device provider loads and, when the device provider terminates, frees allocated resources.|
|ObjectNotify||Calls the service manager when an object in the object store for a Windows CE-based device is changed or deleted.|
|GetObjectType||Returns the type of the specified object.|
|ReportStatus||Optional. Returns status for synchronization objects.|
Steps in Developing ActiveSync Providers | Defining ActiveSync Objects | Developing the Desktop Provider | Implementing the Desktop Interfaces | Configuring the ActiveSync COM Components | Registering the Service Provider | ActiveSync
Send Feedback on this topic to the authors