ReplGetSyncState (Windows Embedded CE 6.0)
1/6/2010
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.
This function is part of the counter-based replication model and is not supported under the bit-based replication model.
Requirements
Header | pwindbas.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
Database Replication Functions
ReplFindNextChange
ReplCheckpoint
ReplCloseSync
ReplOpenSync