Compartir a través de


ReplGetSyncState (Windows CE 5.0)

Send Feedback

This function obtains state information for an open synchronization session. You can save the state information in persistent storage to resume the session later.

BOOL ReplGetSyncState(HREPLhRepl,LPBYTElpSyncState,LPDWORDlpdwSize,BOOLfFailIfUnchanged);

Parameters

  • hRepl
    [in] Handle to an open synchronization session, obtained from a call to the ReplOpenSync function.
  • lpSyncState
    [out] Pointer to a buffer that receives the state information of this synchronization session.
  • lpdwSize
    [out] Pointer to a DWORD containing the size of the synchronization state buffer, in bytes.
  • fFailIfUnchanged
    [in] Flag that determines whether to return any information if the state has not changed since the last successful call to ReplGetSyncState.

Return Values

Returns TRUE if the session creates or reopens successfully. Returns FALSE if an error occurs. For extended error information, see the GetLastError function.

Remarks

You can later restore the state of the synchronization session obtained from ReplGetSyncState by passing the buffer of information to ReplOpenSync. This state information includes the state of the ReplFindNextChange function.

If the buffer is not large enough to hold the state information for this synchronization session, the return value will be FALSE and GetLastError will return ERROR_INSUFFICIENT_BUFFER. The necessary buffer size will be stored in the DWORD pointed at by lpdwSize.

If the fFailIfUnchanged parameter is TRUE and the state has not changed since the last successful call to ReplGetSyncState, the return value will be FALSE and GetLastError will return ERROR_ALREADY_EXISTS.

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 | ReplFindNextChange | ReplCheckpoint | ReplCloseSync | ReplOpenSync

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.