Compartir a través de


ReplFindNextChange (Windows CE 5.0)

Send Feedback

This function is used by synchronization clients use to enumerate the changes made by other applications in the object store or database volume.

BOOL ReplFindNextChange(HREPLhRepl,REPLCHANGEINFO* lpChangeInfo,BOOLfRestart);

Parameters

  • hRepl
    [in] Handle to an open synchronization session, obtained from a call to the ReplOpenSync function.
  • lpChangeInfo
    [out] Pointer to a REPLCHANGEINFO structure that will receive information about one changed object inside the volume.
  • fRestart
    [in] Flag that indicates whether to reset the iteration at the beginning of changes since the last checkpoint.

Return Values

Returns TRUE if information about a changed object successfully returns. Returns FALSE if an error occurs. For extended error information, see the GetLastError function. If no more changed items exist, the call returns FALSE and GetLastError returns ERROR_NO_MORE_ITEMS.

Remarks

On the first call to ReplFindNextChange after the synchronization opens or following a checkpoint, the synchronization state receives a built list of changed items to enumerate. On each following call to ReplFindNextChange, the position in the list will be incremented and the next item returned. You can reset the position in the list with the fRestart parameter. Using the fRestart parameter will reset the enumeration of changed items following the synchronization session creation or since the last checkpoint. It does not back up past a previous checkpoint. To completely re-enumerate items in the volume, create a new synchronization session by calling ReplOpenSync without a state buffer.

Performing a checkpoint will reset the enumeration state used by ReplFindNextChange. Following a checkpoint, ReplFindNextChange will return the changes made by other threads and applications since the previous checkpoint. Calling the ReplCheckpoint function before all changes have been enumerated will discard the list of changes to be enumerated by ReplFindNextChange and could result in some data not being synchronized.

The state of the enumeration is included in the state information obtained from the ReplGetSyncState function. If you pass the saved state buffer to ReplOpenSync, the enumeration can resume without loss after a call to the ReplCloseSync function.

With the exception of deletions, ReplFindNextChange does not return changes made by the present client to the present client. Due to the incomplete information that is stored about deleted items, ReplFindNextChange may report some deletions to the thread that performed them. In addition, a client may receive duplicate reports of some deletions, if an application deletes and does not reuse an OID. You should write clients so that unexpected deletion reports do not cause problems.

ReplFindNextChange only returns items that have been created, modified, or deleted before the last checkpoint. Items that were changed since the last checkpoint will not be reported until after the next checkpoint.

ReplFindNextChange will only return items that have status REPLSTATUS_MODIFIED or REPLSTATUS_DELETED. For more information about these status flags, see REPLCHANGEINFO.

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

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Pwindbas.h.
Link Library: Coredll.lib.

See Also

Counter-Based Replication | ReplCheckpoint | ReplCloseSync | ReplGetOidStatus | ReplGetSyncState | ReplOpenSync | REPLCHANGEINFO

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.