Installing an ActiveSync provider on a Windows CE device requires the following steps:
Installing the ActiveSync provider on the desktop PC requires more work, since a COM component is being registered. Here are the steps:
As well as writing the standard registry entries for a COM component, entries specific to an ActiveSync provider are added. The code to add COM component entries is contained in the function DllRegisterServer in COMDLL.CPP. This calls the function RegisterActiveSync in COMDLL.CPP to add the ActiveSync provider registry entries. A new key with the same name used on the Windows CE device (for example, "AsyncSample") is added in the following location: HKEY_LOCAL_MACHINE Software Microsoft Windows CE Services Services Synchronization Objects Appointment Contact Task AsyncSample It is important that the Windows CE device and desktop PC use the same key names, since this forms the link between the two sides of the ActiveSync provider. On the desktop PC the key contains the following values: AsyncSample [Default] "ActiveSync Example Provider" Display Name "TestNote" Plural Name "TestNotes" Store "Asdesktop.ActiveSyncEg" Disabled 0 The "[default]", "Display Name", and "Plural Name" REG_SZ string entries are used by ActiveSync to display information about the provider's status. The "Store" REG_SZ string contains the ProgID of the desktop COM Component that implements the ActiveSync provider. This string is the same value used when the DLL (for example, ASDesktop.DLL) registers its COM component. ActiveSync uses this value to locate the COM component and uses the COM registry entry "InProcServer" to find the fully qualified pathname for the DLL's location. The "Disabled" value (a REG_DWORD) has a value of 0 if the provider is active, or 1 if it is temporarily disabled. AsyncSample is actually a folder, or object type (the terms mean the same). A store can implement multiple folders by having several object types (for example, Appointment, Contact, and Task) with the same store. The desktop ActiveSync registry settings are copied into each desktop PC profile under the HKEY_CURRENT_USER key, using the same key names as described above. Now, when you run the ActiveSync user interface, you will see a new entry for this provider (Figure 17.2). Figure 17.2. ActiveSync with an additional service
|