ldap_addA function (winldap.h)
The ldap_add function initiates an asynchronous add operation to a directory tree. For an add operation to succeed, the parent of the entry added must exist, or the parent must be empty (equal to the distinguished name of the root).
WINLDAPAPI ULONG LDAPAPI ldap_addA( [in] LDAP *ld, [in] PSTR dn, [in] LDAPModA *  attrs );
The session handle.
A pointer to a null-terminated string that contains the distinguished name of the entry to add.
An array of pointers to LDAPMod structures. Each structure specifies a single attribute.
If the function succeeds, the message ID of the add operation is returned.
Before calling ldap_add, create an entry by specifying its attributes in LDAPMod structures. Set the mod_op member of each structure to LDAP_MOD_ADD, and set the mod_type and mod_vals members as appropriate for your entry.
As an asynchronous function, ldap_add returns a message ID for the operation. Call ldap_result with the message ID to get the result of the operation. To cancel an asynchronous add operation before it has been completed, call ldap_abandon.
Multithreading: Calls to ldap_add are thread-safe, provided that LdapGetLastError is used to retrieve the actual session error code when the function call returns the -1 failure code.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|