Developing the Desktop Provider Module

In contrast to the device provider, which has limited functionality, the desktop provider handles the bulk of all communication with the manager. The desktop provider, hereafter referred to simply as the provider, implements two COM interfaces: IReplStore and IReplObjHandler. IReplStore enumerates objects in a store, checks for changes in an object, and displays a user interface so that the user can set synchronization options and resolve conflicts. IReplObjHandler serializes data and deletes objects. For more information on the methods contained in IReplStore and IReplObjHandler, see the Windows CE Programmer Reference.

    To implement the desktop provider module

  1. Create one GUID for the store, by using the Microsoft Visual C++® GUID generator tool, Guidgen.exe.
  2. Initialize the store.
  3. Compare store identifiers and handle mismapped store identifiers.
  4. Define object handles to provide access to data objects stored on a device.

    The object handles typically are pointers to data structures and include HREPLITEM, HREPLFLD, and HREPLOBJ. HREPLOBJ is a generic handle to either an item or a folder.

  5. Provide a folder handle for the specified object type and, to access folders, return a pointer to the IReplObjHandler interface.
  6. Enumerate objects for a specified object type.
  7. Detect changes in object types.
  8. Send and receive objects.
  9. Create a UI to set synchronization options for a device and handle conflicts.