ldap_next_reference function (winldap.h)

The ldap_next_reference function retrieves a reference from a search result chain.

Syntax

WINLDAPAPI LDAPMessage *LDAPAPI ldap_next_reference(
  [in] LDAP        *ld,
  [in] LDAPMessage *entry
);

Parameters

[in] ld

The session handle.

[in] entry

The entry returned by a previous call to ldap_first_reference or ldap_next_reference.

Return value

If the search returned valid results, this function returns a pointer to the next result entry in the results set. If no further entries or references exist in the result set, it returns NULL. This is the only error return; the session error parameter in the LDAP data structure is cleared to 0 in either case.

Remarks

Use ldap_next_reference in conjunction with ldap_first_reference to step through and retrieve a list of continuation references from a search result chain.

The function returns subordinate referrals (references) that are returned in search responses. A subordinate referral is one in which the server has returned some data and the referral has been passed to other naming contexts below the current level in the tree. To step through external references in which the naming context does not reside on the server, use ldap_parse_result.

You are not required to explicitly free the returned reference, as it is freed when the message itself is freed.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header winldap.h
Library Wldap32.lib
DLL Wldap32.dll

See also

Functions

ldap_first_reference

ldap_parse_result