First, you need to understand how ActiveSync organizes data in items, folders, and the store. ItemThe basic unit of synchronization is the item. In Pocket Outlook, an appointment or contact is an item. Each item has two important pieces of information associated with it:
You can define these data items in any way you choose, but you should keep them as small as possible. ActiveSync stores a copy of the data items in the file repl.dat for each item being synchronized. There is a repl. dat file for each profile on the desktop PC. You are free to define the size and nature of these two pieces of data. You communicate this data to ActiveSync through the generic pointer type HREPLITEM. Note that HREPLITEM structures are used and stored only on the desktop PC, not on the Windows CE device. FolderItems are stored in folders. Folders group items of a similar type. For example, you might have a folder for appointments and a folder for contacts. You can use any data you like to identify the folder, and this data is passed to ActiveSync through the generic pointer type HREPLFLD. These structures are used only on the desktop PC and not on the Windows CE device. Folders are a way to group items together logically. ActiveSync makes no stipulations as to how or where folders are stored. If possible, use a single folder since it makes programming simpler. StoreFolders are organized into a single store. Each store has a unique string identifier that is used to link the provider on the device to the provider on the desktop. This identifier is a COM progid, such as "MS.WinCE.Outlook". You will implement a DLL for the device and another for the desktop PC that will support synchronization for the store. Any storage technique can be used for data in the store, but the following will make for an easier implementation:
|