ISyncMgrSynchronize::Initialize method

Called by the synchronization manager in a registered application handler to determine whether the handler processes the synchronization event.

Syntax


HRESULT Initialize(
  [in]  DWORD dwReserved,
  [in]  DWORD dwSyncMgrFlags,
  [in]  DWORD cbCookie,
  [in]  BYTE const *lpCookie
);

Parameters

dwReserved [in]

Type: DWORD

Reserved; must be 0 (zero).

dwSyncMgrFlags [in]

Type: DWORD

The SYNCMGRFLAG enumeration values that describe how a synchronization event is initiated.

cbCookie [in]

Type: DWORD

The size of the lpCookie data, in bytes.

lpCookie [in]

Type: BYTE const*

A pointer to the token that identifies an application. This token is passed when an application invokes the synchronization manager programmatically.

Return value

Type: HRESULT

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

Return codeDescription
S_OK

Initialization is successful.

S_FALSE

Application handler does not process a synchronization event.

 

Remarks

The SYNCMGRFLAG enumeration values apply through the lifetime of the ISyncMgrSynchronize interface, and are used by the other ISyncMgrSynchronize methods.

If an application does not recognize the SYNCMGRFLAG event, the application should treat the event as a manual synchronization.

A registered application handler cannot display a user interface within this call unless it is the first time the initialization method is called. An application can display any one-time initialization it needs to set up items and introduce a user to an application feature. If you need to display a user interface for a different reason as part of the synchronization process, you can use the ISyncMgrSynchronize::PrepareForSync method.

The lpCookie parameter is NULL unless a handling application invokes the synchronization manager programmatically by using UpdateItems. In this scenario, the class identifier (CLSID) identifies the handling application, and the value of lpCookie is passed in by the handling application, and then passed back by the synchronization manager during synchronization for context. The lpCookie parameter is only meaningful when SYNCMGRFLAG_INVOKE is set.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mobsync.h

DLL

Mobsync.dll

See also

SYNCMGRFLAG
ISyncMgrSynchronize
ISyncMgrSynchronize::PrepareForSync
UpdateItems

 

 

Community Additions

ADD
Show:
© 2014 Microsoft