Partager via


ldap_add_ext_s (Windows CE 5.0)

Send Feedback

This 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,UNICODE PTCHARdn,LDAPMod* attrs[],LDAPControl** ServerControls,LDAPControl** ClientControls);

Parameters

  • ld
    [in] Session handle.
  • dn
    [in] Distinguished name of the entry to add.
  • attrs
    [in] Null-terminated array of pointers to LDAPMod structures. Each structure specifies a single attribute. See the Remarks section for more information.
  • ServerControls
    [in] A list of LDAP server controls.
  • ClientControls
    [in] A list of client controls.

Return Values

If this function succeeds, the return value is LDAP_SUCCESS.

If this function fails, it returns an error code. See the LDAP_RETCODE enumeration for a list of possible return values.

Remarks

The parameters and effects of this function include those of the ldap_add_s function. 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, this function returns to the caller. Use the ldap_add_ext function if you prefer to have the operation carried out asynchronously.

In a multithreading environment, calls to ldap_add_ext_s are thread-safe.

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 functions) before attempting other operations.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Winldap.h.
Link Library: Wldap32.lib.

See Also

ldap_add_ext | ldap_add_s | ldap_bind | ldap_simple_bind | LDAPMod

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.