Partager via


SyncUpdateProc callback function

The SyncUpdateProc function is an application-defined function that handles update messages passed from the DsReplicaSyncAll function. SyncUpdateProc is a placeholder for the application-defined callback function name.

Syntax

BOOL SyncUpdateProc(
   LPVOID                pData,
   PDS_REPSYNCALL_UPDATE pUpdate
);

Parameters

  • pData
    Pointer to application-defined data passed in the pCallbackData parameter of the DsReplicaSyncAll function.

  • pUpdate
    Pointer to a DS_REPSYNCALL_UPDATE structure that describes the event in the DsReplicaSyncAll function that caused the SyncUpdateProc callback function to be called.

Return value

Execution of the DsReplicaSyncAll function pauses when it calls the SyncUpdateProc callback function. If SyncUpdateProc returns TRUE, execution of DsReplicaSyncAll resumes. Otherwise, the DsReplicaSyncAll function terminates.

Remarks

You may use the SyncUpdateProc callback function to display the status of a DsReplicaSyncAll call to the user. The callback might also inform the user that the DsReplicaSyncAll function has encountered an error while synchronizing two servers, then query the user whether to continue synchronizing other servers or to stop replication.

The DsReplicaSyncAll function calls SyncUpdateProc when any of four events occur:

  • Synchronization has resulted in an error.
  • Synchronization of two servers is initiated.
  • Synchronization of two servers is finished.
  • Replication is complete for all the servers in the site.

The nature of the event that caused the DsReplicaSyncAll function to call SyncUpdateProc is stored in the event member of the DS_REPSYNCALL_UPDATE structure pointed to by the pUpdate parameter.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Ntdsapi.h

See also

DS_REPSYNCALL_UPDATE

DsReplicaSyncAll

Domain Controller and Replication Management Functions