次の方法で共有


ReplChangeSyncSettings (Windows Embedded CE 6.0)

1/6/2010

This function changes the synchronization client's settings for its synchronization session.

Syntax

BOOL ReplChangeSyncSettings(
  HREPL hRepl,
  DWORD dwSyncFlags,
  LPDWORD lpdwOldFlags
);

Parameters

  • hRepl
    [in] Handle to an open replication session.
  • dwSyncFlags
    [in] Desired settings for the synchronization session. The following table possible values.

    Flag Description

    REPL_SYNC_ALLOWOVERWRITE

    Enables this client to overwrite changes made by other applications that it has not yet synchronized.

    Zero

    Blocks this client from overwriting changes made by other applications that it has not yet synchronized.

  • lpdwOldFlags
    [out] Pointer to a DWORD that receives the previous settings. This parameter can be set to NULL if you do not need the previous flag.

Return Value

TRUE indicates success. FALSE indicates failure. For extended error information, call GetLastError.

Remarks

The synchronization settings affect modifications made by the client thread only. They do not affect the behavior of other clients or applications or of other threads within the client thread's process. They can change at any time to determine the future write and delete behavior of the client.

This function is part of the counter-based replication model and is not supported under the bit-based replication model.

The synchronization flags affect the behavior of the CeWriteRecordProps (CEDB) and the CeDeleteRecord (CEDB) functions. These functions fail with ERROR_ACCESS_DENIED to block the synchronization client from overwriting changes it has not yet read.

Requirements

Header pwindbas.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Database Replication Functions
CeDeleteRecord (CEDB)
CeWriteRecordProps (CEDB)
ReplOpenSync

Concepts

Using Replication to Synchronize Data