Directory Services


The DsReplicaModify function modifies an existing replication source reference for a destination naming context.

DWORD DsReplicaModify(
  LPCTSTR NameContext,
  const UUID* pUuidSourceDsa,
  LPCTSTR TransportDn,
  LPCTSTR SourceDsaAddress,
  const PSCHEDULE pSchedule,
  DWORD ReplicaFlags,
  DWORD ModifyFields,
  DWORD Options


[in] Bind handle to the directory service.
[in] Pointer to a constant null-terminated string that specifies the distinguished name (DN) of the destination naming context (NC).
[in] Pointer to the UUID of the source directory system agent (DSA). This parameter may be null if ModifyFields does not include DS_REPMOD_UPDATE_ADDRESS and SourceDsaAddress is not NULL.
[in] Reserved for future use. Any value other than NULL results in ERROR_NOT_SUPPORTED being returned.
[in] Pointer to a constant null-terminated Unicode string that specifies the transport-specific address of the source DSA. This parameter is ignored if pUuidSourceDsa is not NULL and ModifyFields does not include DS_REPMOD_UPDATE_ADDRESS.
[in] Pointer to a SCHEDULE structure that contains the replication schedule data for the replication source. This parameter is optional and can be NULL if not used. This parameter is required if ModifyFields contains the DS_REPMOD_UPDATE_SCHEDULE flag.
[in] Reserved for future use. Any value other than 0 results in ERROR_NOT_SUPPORTED being returned.
[in] Specifies what fields should be modified. At least one field must be specified in ModifyFields. This parameter can be a combination of the following values.
Value Meaning
DS_REPMOD_UPDATE_ADDRESS Updates the address associated with the referenced server.
DS_REPMOD_UPDATE_FLAGS Updates the flags associated with the replica.
DS_REPMOD_UPDATE_RESULT Not used. Specifying updates of result values is not allowed at this time. Result values default to 0.
DS_REPMOD_UPDATE_SCHEDULE Updates the periodic replication schedule associated with the replica.
DS_REPMOD_UPDATE_TRANSPORT Updates the transport associated with the replica.
[in] Passes additional data used to process the request. This parameter can be a combination of the following values.
Value Meaning
DS_REPMOD_ASYNCHRONOUS_OPERATION Performs this operation asynchronously.
DS_REPMOD_WRITEABLE Indicates that the replica being modified can be written to.

Return Values

If the function succeeds, 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 A parameter is incorrect.
ERROR_NOT_SUPPORTED The function caller attempted to use a parameter reserved for future use.


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.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP.
Header: Declared in Ntdsapi.h.
Library: Use Ntdsapi.lib.

See Also

SCHEDULE, DsReplicaAdd, DsReplicaDel, DsReplicaSync, DsReplicaUpdateRefs, Domain Controller and Replication Management Functions