Steps to Implement Desktop Synchronization

< BACK  NEXT >
[oR]

Follow these steps to implement basic desktop synchronization:

  1. Create a standard DLL project.

  2. Write code to register the desktop ActiveSync provider in the registry.

  3. Implement the ActiveSync IReplObjHandler COM interface. This interface is the same one as implemented in the device DLL.

  4. Implement the ActiveSync IReplStore COM interface. This interface implements functions to manage the store, folders, and items; manage conflicts; remove duplicates; and present user-interface dialogs to set options.

  5. Decide on the data used for HREPLFLD (folder identifiers) and HREPLITEM (item identifiers). For reasons that will become apparent later, it is easiest to define a structure with a union defining the data for the folder and field identifier.

  6. Write code to add, update, and delete items from the store. This code typically can be shared with the application that will need to perform the same tasks.

Unlike the device DLL, the desktop DLL needs to implement a true COM component. This means that a class factory and standard COM-exported functions are required. The DLL can be written from the ground up (as is done with the sample application presented in this chapter), or you can choose to use MFC or ATL to simplify the task.

The Windows CE DLL will obviously be implemented using Unicode (wide) strings. The desktop PC DLL is best implemented to use ANSI (multi-byte) characters, since the structures passed from the ActiveSync service contain ANSI strings. The data transferred between the Windows CE and desktop PC DLLs can be either Unicode or ANSI it is your choice. However, you will need to convert the strings from Unicode to ANSI (for data being transferred from the Windows CE device to the desktop PC) or from ANSI to Unicode (for data being transferred from the desktop PC to the Windows CE device). You can perform this conversion either on the CE device or on the desktop PC.


< BACK  NEXT >


Windows CE 3. 0 Application Programming
Windows CE 3.0: Application Programming (Prentice Hall Series on Microsoft Technologies)
ISBN: 0130255920
EAN: 2147483647
Year: 2002
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net