IReplStore::ReportStatus

ActiveSync service manager calls Report Status to get information on the status of the synchronization. See the definition of uStatus for available status codes. This is an API exported by the store.dll for the synchronization engine.

Syntax

HRESULT ReportStatus(
HREPLFLD
hFolder,
HREPLITEM
hItem,
UINT
uStatus,
UINT
uParam
);

At a Glance

Header file: Cesync.h
Platforms: H/PC
Windows CE versions: 2.0 and later

Parameters

hFolder
Handle to the folder this status applies to. This parameter is NULL if status applies to all folders.
hItem
Handle to the object this status applies to. This parameter is NULL if status applies to all objects.
uStatus
Status code. Can be one of the following:
RSC_BEGIN_SYNC
Synchronization is about to start; uReserved is a combination of bit flags:

BSF_AUTO_SYNC synchronization is started as a result of changes while "autosync on change" is turned on.

BSF_REMOTE_SYNC consistent with RSC_REMOTE_SYNC, set if synchronization is done remotely.

RSC_END_SYNC
Synchronization has ended.
RSC_BEGIN_CHECK
The ActiveSync service manager is about to call FindFirstItem and FindNextItem.
RSC_END_CHECK
The ActiveSync service manager has completed all enumeration calls (FindItemClose has been called).
RSC_DATE_CHANGED
The user has changed the system date. This code is called on every existing object in the store to give the ActiveSync service provider a chance to reset the synchronization options that depend on date. For example, if an ActiveSync service provider wants to synchronize files that are modified in the last two weeks, it can respond to this code to reset the enable bit for each item such that when IsItemReplicated is called later, it will re-evaluate based on the new date.
RSC_RELEASE
The ActiveSync service manager is about to release the IReplStore object. This is called before the final IReplStore::Release call.
RSC_REMOTE_SYNC
If uParam is TRUE, the ActiveSync service manager is about to start remote synchronization. The ActiveSync service provider should not show any UI that requires user interaction from now on until this status code is used again with uParam equal to FALSE.
RSC_INTERRUPT
ActiveSync service manager is about to interrupt the current operation.

these values of uParam are defined only for RSC_INTERRUPT:

PSA_RESET_INTERRUPT

This flag is set if the interrupt state is being cleared (that is, normal operation is resuming).

PSA_SYS_SHUTDOWN

User has shut down Windows operating system

RSC_BEGIN_SYNC_OBJ
Synchronization is about to start on an object type. uReserved is a combination of bit flags (see RSC_BEGIN_SYNC).
RSC_END_SYNC_OBJ
Synchronization is about to end on an object type.
RSC_OBJ_TYPE_ENABLED
Synchronization of the given object is enabled; hFolder is indeed a pointer to a string (object type name)
RSC_OBJ_TYPE_DISABLED
Synchronization of the given object is disabled; hFolder is indeed a pointer to a string (object type name)
RSC_BEGIN_BATCH_WRITE
A series of SetPackets will be called on a number of objects. This is the time for ActiveSync service provider to start a transaction.
RSC_END_BATCH_WRITE
RSC_BEGIN_BATCH_WRITE has ended. This is the time for the ActiveSync service provider to commit the transaction.
RSC_CONNECTION_CHG
The connection status has changed. uParam is TRUE if a connection has been established, otherwise it is FALSE.
RSC_WRITE_OBJ_FAILED
There was a failure while writing to an object on the device. uParam is the HRESULT code.
RSC_DELETE_OBJ_FAILED
There was a failture while deleting an object on the device. uParam is the HRESULT code.
uParam
Additional information about the status, based on uStatus code.

Return Values

NOERROR
the process indicated by uStatus is successful.
E_FAIL
the process indicated by uStatus has failed or encountered problems.

Remarks

The ActiveSync service provider can simply return NOERROR for all cases if it is not interested.

See Also

IReplStore