Platform SDK: Active Directory, ADSI, and Directory Services

ldap_next_entry

The ldap_next_entry function retrieves an entry from a search result chain.

LDAPMessage* ldap_next_entry(
  LDAP* ld,
  LDAPMessage* entry 
);

Parameters

ld
[in] The session handle.
entry
[in] The entry returned by a previous call to ldap_first_entry or ldap_next_entry.

Return Values

If the function succeeds, it returns the entry. If no entry or reference exists in the result set, it returns NULL.

If the function fails, it returns NULL and sets the session error parameters in the LDAP data structure.

Remarks

Use ldap_next_entry in conjunction with ldap_first_entry to step through and retrieve the list of entries from a search result chain.

You do not have to explicitly free the returned entry because it is freed when the message itself is freed.

Requirements

  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.

See Also

Functions, ldap_first_entry