DsReplicaAdd function
The DsReplicaAdd function adds a replication source reference to a destination naming context.
Syntax
DWORD DsReplicaAdd(
_In_ HANDLE hDS,
_In_ LPCTSTR NameContext,
_In_ LPCTSTR SourceDsaDn,
_In_ LPCTSTR TransportDn,
_In_ LPCTSTR SourceDsaAddress,
_In_ const PSCHEDULE pSchedule,
_In_ DWORD Options
);
Parameters
- hDS [in]
-
Contains a directory service handle obtained from either the DSBind or DSBindWithCred function.
- NameContext [in]
-
The null-terminated string that specifies the distinguished name (DN) of the destination naming context (NC) for which to add the replica. The destination NC record must exist locally as either an object, instantiated or not, or a reference phantom, for example, a phantom with a GUID.
- SourceDsaDn [in]
-
The null-terminated string that specifies the DN of the NTDS-DSA object for the source directory system agent. This parameter is required if Options includes DS_REPADD_ASYNCHRONOUS_REPLICA; otherwise, it is ignored.
- TransportDn [in]
-
The null-terminated string that specifies the DN of the interSiteTransport object that represents the transport used for communication with the source server. This parameter is required if Options includes DS_REPADD_INTERSITE_MESSAGING; otherwise, it is ignored.
- SourceDsaAddress [in]
-
The null-terminated string that specifies the transport-specific address of the source DSA. This source server is identified by a string name, not by its UUID. A string name appropriate for SourceDsaAddress is usually a DNS name based on a GUID, where the GUID part of the name is the GUID of the NTDS-DSA object for the source server.
- pSchedule [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.
- Options [in]
-
Passes additional data to be used to process the request. This parameter can be a combination of the following values.
Return value
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 |
|---|---|
|
A parameter is invalid. |
|
The requested version of the directory service server extensions is not supported. |
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Redistributable | Active Directory Client Extension on Windows NT 4.0 and Windows Me/98/95 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | DsReplicaAddW (Unicode) and DsReplicaAddA (ANSI) |
See also
- Domain Controller and Replication Management Functions
- DsReplicaDel
- DsReplicaModify
- DsReplicaSync
- DsReplicaUpdateRefs
- SCHEDULE
Send comments about this topic to Microsoft
Build date: 10/26/2012