ISyncMgrSynchronize::PrepareForSync method (mobsync.h)

Allows a 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 email client may need to display the password dialog box to enable a user to log on to a mail server.

Syntax

HRESULT PrepareForSync(
  ULONG cbNumItems,
  GUID  *pItemIDs,
  HWND  hWndParent,
  DWORD dwReserved
);

Parameters

cbNumItems

Type: ULONG

The number of items in the array pointed to by pItemIDs.

pItemIDs

Type: GUID*

An array of item IDs that a user chooses to synchronize.

hWndParent

Type: HWND

A handle to the parent HWND that a registered application should use for any user interface element displayed. This value may be NULL.

dwReserved

Type: DWORD

Reserved. Registered applications should ignore this value.

Return value

Type: HRESULT

This method supports the standard return values E_INVALIDARG, E_UNEXPECTED, and E_OUTOFMEMORY, and the following:

Return code Description
S_OK
Preparation is successful.

Remarks

A registered application handler should return from this method as soon as possible, and then call the PrepareForSyncCompleted method. A registered application handler can call the PrepareForSyncCompleted method before returning from this method.

Registered applications should only show a user interface if the SYNCMGRFLAG_MAYBOTHERUSER flag is 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 item IDs that are passed into this method are relevant to the ISyncMgrSynchronize::Synchronize method also.

The ISyncMgrSynchronizeCallback methods can be called on any thread in a registered application.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mobsync.h
DLL Mobsync.dll

See also

ISyncMgrSynchronize

ISyncMgrSynchronize::Initialize

ISyncMgrSynchronize::Synchronize

ISyncMgrSynchronizeCallback

PrepareForSyncCompleted

SYNCMGRFLAG