Platform SDK: Active Directory, ADSI, and Directory Services

DsReplicaModify

The DsReplicaModify function modifies a replication source reference for a destination naming context (NC).

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

Parameters

hDS
[in] Bind handle to the directory service.
NameContext
[in] Pointer to a constant null-terminated Unicode string specifying the distinguished name (DN) of the destination NC.
pUuidSourceDsa
[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.
TransportDn
[in] This parameter is reserved for future use. Any value other than NULL will result in ERROR_NOT_SUPPORTED.
SourceDsaAddress
[in] Pointer to a constant null-terminated Unicode string specifying 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.
pSchedule
[in] Pointer to the schedule for this replica. This parameter is ignored if ModifyFields does not include DS_REPMOD_UPDATE_SCHEDULE.
ReplicaFlags
[in] This parameter is reserved for future use. Any value other than 0 will result in ERROR_NOT_SUPPORTED.
ModifyFields
[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.

Options
[in] Passes additional information to be 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 Signifies the replica being modified is writeable.

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.

ERROR_INVALID_PARAMETER
A parameter is incorrect.
ERROR_NOT_SUPPORTED
The function caller attempted to use a parameter reserved for future use.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntdsapi.h.
  Library: Included as a resource in Ntdsapi.dll.
  Unicode: Implemented as Unicode and ANSI versions on Windows 2000.

See Also

DC and Replication Management Functions, DsReplicaAdd, DsReplicaDel, DsReplicaSync, DsReplicaSyncAll, DsReplicaUpdateRefs