CeBeginSyncSession (EDB) (Compact 7)

3/12/2014

This function begins a synchronization session for a database volume.

Syntax

BOOL CeBeginSyncSession(
    HANDLE  hSession,
    PCEGUID pSyncPartnerGuid,
    CEDBGEN genFrom,
    CEDBGEN genTo,
    DWORD   dwFlags,
    CEDBGEN* pGenCur
);

Parameters

  • pSyncPartnerGuid
    [in] Pointer to The CEGUID structure that uniquely identifies the synchronization partner. This parameter cannot be set to NULL.
  • genFrom
    [in] Lower end of the generation range. The generation of a synchronization session determines which changes are to be collected. If the value is CEDBGEN_DEFAULT, the generation of the last successful synchronization for the synchronization partner is assumed.
  • genTo
    [in] Upper end of the generation range. The generation of a synchronization session determines which changes are to be collected. If the value is CEDBGEN_DEFAULT, the current generation is assumed.
  • dwFlags
    [in] Flags for this synchronization session. It can be a packed combination of the flags shown in the following table.

    Flag Description

    DB_SYNCSESSION_NOTRACK

    Changes applied during the synchronization session are not tracked.

    DB_SYNCSESSION_ OVERRRIDELOCALCHANGES

    Changes from this session override changes made by another session.

    DB_SYNCSESSION_TRACKSERVER

    Changes applied during the synchronization session are tracked.

  • pGenCur
    [out] Pointer to a buffer to contain the generation of the synchronization session. This parameter cannot be set to NULL.

Return Value

True indicates success. False indicates failure. To get extended error information, call GetLastError. The following table shows possible values.

Return Value Description

ERROR_INTERNAL_DB_CORRUPTION

The database is corrupted.

ERROR_INVALID_HANDLE

The handle is invalid.

ERROR_INVALID_PARAMETER

One or more parameters are invalid.

Remarks

There can be only one synchronization session per mounted volume.

Invoking the tracking functions on a CEDB volume causes an error, and GetLastError returns ERROR_INVALID_PARAMETER.

Requirements

Header

windbase.h

Library

coredll.lib

See Also

Reference

EDB Functions
CeEndSyncSession (EDB)