Share via


Initializing the Store (Windows CE 5.0)

Send Feedback

When a connection is made, the service manager calls IReplStore::Initialize to let the service provider initialize the store. The service manager does the following.

  • Initializes the data store and compares store identifiers to determine if the desktop store has changed since the previous initialization.
  • Enumerates each desktop object in the desktop store.
  • Determines which data has changed and transfers that data from the desktop to the Windows CE-based device, or from the Windows CE-based device to the desktop.

To do these things, the service manager calls the desktop provider to respond with the necessary information. The following illustration shows the sequence in which the service manager calls the desktop provider.

ms861657.flow1_4(en-us,MSDN.10).gif

To access the profile information for a Windows CE-based device

  • Call CeGetDeviceId to retrieve the registry key for a connected Windows CE-based device profile.
  • Call IReplNotify::QueryDevice with QDC_SEL_DEVICE_KEY to retrieve the registry key for a selected device profile.

If the Windows CE-based device is connected remotely, the service manager passes the ISF_REMOTE_CONNECTED bit flag to IReplStore::Initialize. When this flag is set, the desktop provider must not display any blocking user interface, such as a message or dialog box, because the user is not present at the desktop computer to respond. Instead, the desktop provider should accept all default actions without prompting.

If the service provider returns an error in IReplStore::Initialize, the service manager automatically displays an error message. If you would rather have the desktop provider handle the error message, return RERR_NO_ERR_PROMPT.

The service manager usually calls IReplStore::Initialize immediately after a connection event occurs. However, the service manager can call other methods first, such as when a user changes the synchronization options for a disconnected Windows CE-based device.

The following table shows the methods that can be called before IReplStore::Initialize.

Method Description
IReplStore::GetStoreInfo Obtains information about a store, which is displayed in the ActiveSync Option dialog box.
IReplStore::GetObjTypeUIData Obtains information about an object type, which is displayed in the ActiveSync main menu.
IReplStore::GetFolderInfo Obtains the folder handle, HREPLFLD, to the desktop provider.
IReplStore::ActivateDialog Instructs the service provider to display the options dialog for a particular object type.
IReplStore::ObjectToBytes Converts a HREPLITEM handle or a HREPLFLD handle to a byte sequence.
IReplStore::BytesToObject Converts a byte sequence to a HREPLITEM handle or a HREPLFLD handle.
IReplStore::ReportStatus Optional. Informs the desktop provider about events that are taking place.

See Also

Developing the Desktop Provider

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.