Developing the Desktop Provider
A version of this page is also available for
4/8/2010
The desktop provider handles the bulk of communications with the ActiveSync manager. The provider implements two COM interfaces, IReplStore and IReplObjHandler. IReplStore enumerates objects in the store, checks for changes to an object, and displays a user interface for the user to set synchronization options and resolve conflicts. IReplObjHandler converts objects into data streams and back again, and deletes objects.
The following list outlines what must be done to implement the desktop provider. The sections following provide additional detail for those steps requiring it.
- Use guidgen.exe to create a GUID for the store.
- Initialize the store. For more information, see Initializing the Store.
- Compare store identifiers and handle mismapped store identifiers. For more information, see Comparing Store Identifiers.
- Define object handles to provide access to data objects stored on a Windows Mobile device. For more information, see Accessing Objects.
The object handles typically are pointers to data structures and include HREPLITEM, HREPLFLD, and HREPLOBJ. HREPLOBJ is a generic handle for an item or a folder. - Provide a folder handle for the specified object type and, to access folders, return a pointer to the IReplObjHandler interface. For more information, see Accessing Folders.
- Enumerate objects for a specified object type. For more information, see Enumerating Objects.
- Detect changes in objects. For more information, see Detecting Changes to Desktop Objects.
- Send and receive changed objects. For more information, see Sending and Receiving Changed Objects.
- Create a user interface to set synchronization options and handle conflicts. For more information, see Setting Synchronization Options.