ReplGetSyncState (Compact 2013)
3/26/2014
This function obtains state information for an open synchronization session. You can save the state information in persistent storage to resume the session later.
Syntax
BOOL ReplGetSyncState(
HREPL hRepl,
LPBYTE lpSyncState,
LPDWORD lpdwSize,
BOOL fFailIfUnchanged
);
Parameters
- hRepl
[in] Handle to an open synchronization session, obtained from 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 this function.
Return Value
TRUE indicates success. FALSE indicates failure. For extended error information, call GetLastError.
Remarks
You can later restore the state of the synchronization session obtained from this function by passing the buffer of information to ReplOpenSync. This state information includes the state returned by the ReplFindNextChange function.
If the buffer is not large enough to hold the state information for this synchronization session, the return value is FALSE, and GetLastError returns ERROR_INSUFFICIENT_BUFFER. The necessary buffer size is stored in the DWORD pointed to by lpdwSize.
If fFailIfUnchanged is set to TRUE and the state has not changed since the last successful call to this function, the return value is FALSE, and GetLastError returns ERROR_ALREADY_EXISTS.
Requirements
Header |
pwindbas.h |
Library |
coredll.lib |
See Also
Reference
Database Replication Functions
ReplFindNextChange
ReplCheckpoint
ReplCloseSync
ReplOpenSync