Directory Services

DsReplicaConsistencyCheck

The DsReplicaConsistencyCheck function invokes the Knowledge Consistency Checker (KCC) in order to verify the replication topology. The Knowledge Consistency Checker (KCC) dynamically adjusts the data replication topology of your network when domain controllers are added to or removed from the network, when a domain controller is unavailable, or when the data replication schedules are changed.

DWORD DsReplicaConsistencyCheck(
  HANDLE hDS,
  DS_KCC_TASKID TaskID,
  DWORD dwFlags
);

Parameters

hDS
[in] Contains a bind handle to the directory service. This handle is provided by a call to DsBind, DsBindWithCred, or DsBindWithSpn.
TaskID
[in] Identifies the task the KCC should execute. DS_KCC_TASKID_UPDATE_TOPOLOGY is the only supported value at this time.
dwFlags
[in] Contains a set of flags that modify the behavior of the function. This can be zero or a combination of one or more of the following values.
Value Meaning
DS_KCC_FLAG_ASYNC_OP The task is queued and then the function returns without waiting for the task to complete.
DS_KCC_FLAG_DAMPED The task will not be added to the queue if another queued task will run soon.

Return Values

If the function performs its operation successfully, the return value is ERROR_SUCCESS. If the function fails, the return value can be one of the following.
Return Code Description
ERROR_INVALID_PARAMETER One of the specified parameters is incorrect.
ERROR_NOT_SUPPORTED The requested version of the directory service server extensions is not supported.
ERROR_DS_DRA_ACCESS_DENIED The user associated with the credentials tied to hDS does not have sufficient privileges to read the requested replication state information. The user must have the "Manage Replication Topology" control access right on the root of the configuration naming context.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Ntdsapi.h.
Library: Use Ntdsapi.lib.

See Also

DsBind, DsBindWithCred, DsBindWithSpn, Domain Controller and Replication Management Functions