Platform SDK: Active Directory, ADSI, and Directory Services |
The ldap_add_ext_s function initiates a synchronous add operation to a tree. For an add operation to succeed, the parent of the entry being added must already exist or the parent must be empty (equal to the distinguished name of the root).
ULONG ldap_add_ext_s( LDAP* ld, PCHAR dn, LDAPMod* attrs[] PLDAPControl* ServerControls, PLDAPControl* ClientControls );
If the function succeeds, the return value is LDAP_SUCCESS.
If the function fails, it returns an error code. See Return Values for more information.
The parameters and effects of ldap_add_ext_s subsume those of ldap_add_s. The extended routine includes additional parameters to support client and server controls.
Before calling ldap_add_ext_s, you must create an entry by specifying its attributes in LDAPMod structures. Set the mod_op member of the each structure to LDAP_MOD_ADD, and set the mod_type and mod_vals members as appropriate for your entry.
Upon completion of the add operation, ldap_add_ext_s returns to the caller. Use ldap_add_ext if you prefer to have the operation carried out asynchronously.
Multithreading: Calls to ldap_add_ext_s are thread-safe.
Note When connecting to an LDAP 2 server, the application must perform a bind operation (by calling one of the ldap_bind or ldap_simple_bind routines) before attempting other operations.
Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.
Unicode: Declared as Unicode and ANSI prototypes.
Functions, ldap_add_ext, ldap_add_s, ldap_bind, LDAPMod, ldap_simple_bind, Return Values