Platform SDK: Synchronization Manager |
The Synchronization Manager calls the ISyncMgrSynchronize::Initialize method in the registered application's handler to determine whether the handler will process the synchronization event.
HRESULT Initialize( DWORD dwReserved, // Reserved DWORD dwSyncMgrFlags, // SYNCMGRFLAG enumeration DWORD cbCookie, // Size of lpCookie BYTE const *lpCookie // Token identifying application );
This method supports the standard return values, E_INVALIDARG, E_UNEXPECTED, and E_OUTOFMEMORY, as well as the following:
The SYNCMGRFLAG enumeration values apply through the lifetime of the ISyncMgrSynchronize interface and are used by the other ISyncMgrSynchronize methods.
If the application does not recognize the SYNCMGRFLAG event, the application should treat the event as a manual synchronization.
The registered application's handler cannot display a user interface within this call unless it is the very first time the initialize method is called. The application is allowed to display any one-time initialization it needs to set up items and introduce the user to the application's feature. If you need to display a user interface for any other reason as part of the synchronization process, you can do so in the ISyncMgrSynchronize::PrepareForSync method.
lpCookie is NULL unless the handling application invoked the Synchronization Manager programmatically using ISyncMgrSynchronizeInvoke::UpdateItems. In this case the CLSID is that of the handling application and the value of lpCookie is passed in by the handling application and is passed back by SyncMgr during synchronization for context. lpCookie is only meaningful if SYNCMGRFLAG_INVOKE is set
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::PrepareForSync, ISyncMgrSynchronizeInvoke::UpdateItems, SYNCMGRFLAG