次の方法で共有


Responding to Synchronization Events

A synchronization application can register to be notified about events that occur during synchronization.

Managed code An application implements an event handler method for an event that is available in the SyncOrchestrator or SyncCallbacks object. Then, it registers the event handler to receive the event.

Unmanaged code An application creates an object that implements the ISyncCallback interface. Before synchronization is started, the application registers the callback object with the session object by calling ISyncSession::RegisterCallback. When synchronization is started, the callback object receives notification of synchronization events through the various methods on the callback interface.

Custom Conflict Resolution

To set the conflict resolution action dynamically for each conflict that occurs, an application handles the item conflict event by using ItemConflicting (for managed code) or ISyncCallback::OnConflict (for unmanaged code). This event fires only when the conflict resolution policy is set to ApplicationDefined (for managed code) or CRP_NONE (for unmanaged code). For more information, see Handling Conflicts.

Progress Reporting

Sync Framework reports synchronization progress to an application by using the ProgressChanged event (for managed code) or ISyncCallback::OnProgress event (for unmanaged code). When this event is raised and the information that it sends depends on the implementation of the source provider. For more information, see Reporting Synchronization Progress.

関連項目

参照

ISyncCallback Interface

SyncOrchestrator

SyncCallbacks

概念

Implementing a Synchronization Application

その他の技術情報

ISyncSession::RegisterCallback