Platform SDK: Active Directory, ADSI, and Directory Services

DsReplicaUpdateRefs

The DsReplicaUpdateRefs function adds or removes a replication reference for a destination from a source naming context (NC).

DWORD DsReplicaUpdateRefs(
  HANDLE hDS,
  LPCTSTR NameContext,
  LPCTSTR DsaDest,
  const UUID *pUuidDsaDest,
  ULONG 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 source NC.
DsaDest
[in] Pointer to a constant null-terminated Unicode string specifying the transport-specific address of the destination directory system agent (DSA).
pUuidDsaDest
[in] Pointer to the UUID of the destination DSA.
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_REPUPD_ADD_REFERENCE Adds a reference to the destination to the source server.
DS_REPUPD_ASYNCHRONOUS_OPERATION Performs this operation asynchronously.
DS_REPUPD_DELETE_REFERENCE Deletes a reference to the destination from the source server.
DS_REPUPD_WRITEABLE Replica whose reference is added or deleted is writeable. Otherwise, it will be read-only.

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.

Remarks

If DS_REPUPD_ADD_REFERENCE and DS_REPUPD_DELETE_REFERENCE are used together in the Options parameter, a reference to the destination will be added if one does not already exist on the server, or an existing reference to the destination will be updated.

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, DsReplicaModify, DsReplicaSync, DsReplicaSyncAll