Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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

hSession

[in] Handle to a session created using the CeCreateSession (EDB)function.

pSyncPartnerGuid

[in] Pointer to The CEGUIDstructure 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 GetLastErrorreturns ERROR_INVALID_PARAMETER.

Requirements

Header windbase.h
Library coredll.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also