Handling and Displaying Service-Provider Errors (Windows Embedded CE 6.0)

1/6/2010

If an object cannot be read from or written to the service provider on the desktop (due to GetPacket or SetPacket call failures, for example), ActiveSync marks the object as "unresolved" and does not display error messages. Error messages are displayed only when the user later selects "Resolve Items."

The service provider can control when errors are displayed, through the use of two sub-flags that indicate when the provider is allowed to display errors. Control is not automatic; the provider must be written to handle the flags correctly.

#define BSF_SHOW_FATAL_ERRORS ((UINT)0x00000004)
// Errors that block synchronization should be displayed immediately.
#define BSF_SHOW_RESOLVE_ERRORS ((UINT)0x00000008)
// Errors should be displayed only during the "resolve items" phase.

These sub-flags are set by ActiveSync in the uParam parameter for RSC_BEGIN_SYNC during IReplStore::ReportStatus calls. When BSF_SHOW_FATAL_ERRORS is set, any serious failure (for example, loss of network connectivity) that keeps the service provider from continuing should be displayed. When BSF_SHOW_RESOLVE_ERRORS is set, any per-object errors should be displayed, typically during GetPacket and SetPacket calls.

If neither flag is set, no errors should be shown. If RSC_REMOTE_SYNC is set, no blocking user interface should be shown.

See Also

Concepts

Handling Sync and Initialization Errors