Frequently Encountered LDAP API Functions

Previous Topic Next Topic

Frequently Encountered LDAP API Functions

Some of the frequently encountered Lightweight Directory Access Protocol (LDAP) application programming interface (API) function calls are listed and described in Table A.1.

Table A.1 LDAP C-Binding APIs

API Name Description
ldap_open Opens a connection to an LDAP server.
ldap_bind Authenticates a client to the LDAP server directory.
ldap_unbind Frees all resources that are associated with an LDAP session.
ldap_search Searches the LDAP directory and returns a requested set of attributes for each entry matched.
ldap_modify Modifies an existing LDAP entry.
ldap_modrdn Changes the relative distinguished name of an LDAP entry. (This function is obsolete and is provided solely for backward compatibility with LDAP 1 implementations.)
ldap_add Adds an entry to the LDAP directory.
ldap_delete Deletes an entry from the LDAP directory.
ldap_abandon When a client calls it, cancels another in-progress asynchronous LDAP call.
ldap_result Obtains the result of an asynchronous operation.
ldap_result2error Interprets errors that are returned by other APIs.
ldap_err2string Converts a numeric LDAP error code into a character string that describes the error.
ldap_first_entry Returns the first entry of a message.
ldap_next entry Retrieves an entry from a search result chain.
ldap_count_entries Counts the number of search entries that a server has returned.
ldap_first_attribute For a specific directory entry, the function returns the first attribute.
ldap_next_attribute For a specific entry, the function returns the next attribute.
ldap_get_values Retrieves the values of a specific attribute for an object.
ldap_get_values_len Retrieves the list of values for a specific attribute. The LDAP directory service uses this information when it parses a search response.
ldap_get_dn Retrieves the distinguished name for a specific entry.
ldap_explode_dn Breaks up an entry name into its component parts.
ldap_dn2ufn Converts a distinguished name into a user-friendly format.

For information about all of the LDAP function calls, see the Microsoft Platform SDK link on the Web Resources page at http://windows.microsoft.com/windows2000/reskit/webresources.

© 1985-2000 Microsoft Corporation. All rights reserved.