Platform SDK: Synchronization Manager |
The Synchronization Manager calls the ISyncMgrSynchronize::Synchronize method once for each selected group after the user has chosen the registered applications to be synchronized.
HRESULT Synchronize( HWND hWndParent // Parent hwnd for user interface );
This method supports the standard return values, E_INVALIDARG, E_UNEXPECTED, and E_OUTOFMEMORY, as well as the following:
If the user does not select any item choices for the registered application, the ISyncMgrSynchronize::Synchronize method is not called and the interface is released. If this method is called, the application must synchronize the items that were specified in the ISyncMgrSynchronize::PrepareForSync method.
The registered application's handler should return from the ISyncMgrSynchronize::Synchronize method as soon as possible and then call the ISyncMgrSynchronizeCallback::SynchronizeCompleted method. It is acceptable for the handler to call the ISyncMgrSynchronizeCallback::SynchronizeCompleted call before returning from the ISyncMgrSynchronize::Synchronize method.
The application must give progress feedback and check whether the synchronization should be canceled by using the pSyncCallBack interface pointer that was setup in the ISyncMgrSynchronize::SetProgressCallback method.
Applications must provide progress information even if the SYNCMGRFLAG_MAYBOTHERUSER was not specified in ISyncMgrSynchronize::Initialize.
Applications should attempt not to show user interface elements from within the ISyncMgrSynchronize::Synchronize method. Any user interface elements should be shown in the ISyncMgrSynchronize::PrepareForSync and ISyncMgrSynchronize::ShowError methods so the end user experiences a consistent user interface which is limited to logon and to specifying shares to be synchronized. Subsequently, the synchronization can be performed without any user intervention. After the synchronization is complete, conflicts or other error messages can be shown.
The ISyncMgrSynchronizeCallback methods can be called on any thread in your application.
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 5 or later).
Windows 95/98: Requires Windows 95 or later (with Internet Explorer 5 or later).
Header: Declared in Mobsync.h.
ISyncMgrSynchronize::Initialize, ISyncMgrSynchronize::PrepareForSync, ISyncMgrSynchronize::SetProgressCallback, ISyncMgrSynchronize::ShowError, ISyncMgrSynchronizeCallback::SynchronizeCompleted