Platform SDK: Synchronization Manager |
The ISyncMgrSynchronize::PrepareForSync method allows the registered application to display any user interface and perform any necessary initialization before the ISyncMgrSynchronize::Synchronize method is called. For example, an application such as the Microsoft® Outlook® e-mail client may need to display the password dialog box to enable the user to log onto the mail server.
HRESULT PrepareForSync( ULONG cbNumItems, // Number of items in ItemId array SYNCMGRITEMID *pItemIDs, // Array of ItemIds HWND hWndParent, // Parent hWnd for user interface DWORD dwReserved // Reserved );
This method supports the standard return values, E_INVALIDARG, E_UNEXPECTED, and E_OUTOFMEMORY, as well as the following:
The registered application's handler should return from this method as soon as possible and then call the ISyncMgrSynchronizeCallback::PrepareForSyncCompleted method. It is possible for the registered application's handler to call the ISyncMgrSynchronizeCallback::PrepareForSyncCompleted method before returning from this method.
Registered applications should only show a user interface if the SYNCMGRFLAG_MAYBOTHERUSER flag was set in the dwSyncFlags parameter of the ISyncMgrSynchronize::Initialize method. If a registered application cannot prepare for synchronization without showing a user interface when the SYNCMGRFLAG_MAYBOTHERUSER flag is not set it should return S_FALSE from this method.
The array of ItemIDs that are passed into this method are relevant to the ISyncMgrSynchronize::Synchronize method also.
The ISyncMgrSynchronizeCallback methods can be called on any thread in the registered 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::Synchronize, ISyncMgrSynchronize::Initialize, ISyncMgrSynchronizeCallback::PrepareForSyncCompleted, ISyncMgrSynchronizeCallback, SYNCMGRFLAG