Platform SDK: Synchronization Manager

ISyncMgrSynchronizeCallback::EstablishConnection

The registered application's handler calls the ISyncMgrSynchronizeCallback::EstablishConnection method when a network connection is required.

HRESULT EstablishConnection(
  [in] WCHAR const *lpwszConnection,
  [in] DWORD dwReserved
);

Parameters

lpwszConnection
[in] Identifies the name of the connection to dial.
dwReserved
[in] Reserved for future use. Must be set to zero.

Return Values

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

S_OK
The connection was successfully established.

Remarks

SyncMgr should use the default autodial connection if lpwszConnection is NULL.

When an instance of EstablishConnection is called by a handler then SyncMgr tries to establish the connection If a subsequent EstablishConnection is called then SyncMgr attempts the new connection without hanging up the previous connection. All connections remain until all handlers have finished synchronizing. After all handlers have synchronized, then any opened connections are closed by SyncMgr.

Requirements

  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.