When the HotSync Button Gets Pressed

We left off in the previous discussion at the point where we are ready to exchange information between the conduit on the desktop and the handheld unit. Let’s continue now walking through the chain of events (see Table 12.1).

Table 12-1. When the HotSync Button Gets Pressed

Action (by the User or by the System)

What Is Happening Programmatically

The HotSync Manager gets the conduit name so that it can display information in the status dialog.

GetConduitName is called and returns.

The HotSync Manager prepares to sync by passing the synchronization off to the conduit.

OpenConduit gets called and the conduit’s DLL gets loaded into memory. It is told whether to do a fast sync, a slow sync, a copy from handheld to desktop, a copy from desktop to handheld, or to do nothing. When OpenConduit returns, it will have completed the task.

The conduit registers with the HotSync Manager.

SyncRegisterConduit returns a handle.

The conduit notifies the log that syncing is about to start.

Conduit calls LogAddEntry(“”, slSyncStarted, false).

The conduit opens the remote order database on the handheld.

Conduit calls SyncOpenDB, which returns a handle to the remote order database.

The user sees that the Sales orders are being synced.

All the data is written from the handheld to the desktop.

The conduit closes the remote database.

Conduit calls SyncCloseDB to close the Sales order database.

The user sees that the Sales application product list ...

Get Palm Programming: The Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.