ldap_next_message

Returns a pointer to the next message of message type, LDAP_RES_SEARCH_ENTRY, LDAP_RES_SEARCH_RESULT, or LDAP_RES_SEARCH_REFERENCE, in chain of LDAPMessage structures.

LDAP Version:v3
Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  LDAPMessage *ldap_next_message (
     LDAP          *ld,
     LDAPMessage   *msg);
  
  

Parameters

ld

(IN) Points to the handle for the LDAP session.

msg

(IN/OUT) Points to the LDAPMessage structure returned by a previous call. On the first call, this is the value returned by the ldap_first_message function. On subsequent calls, it is the value returned by the ldap_next_message function.

Return Values

NULL

No more messages or failure.

>0

Pointer to the next message in the chain

Remarks

If the ldap_next_message function encounters an error, the function returns NULL and sets the LDAP_OPT_RESULT_CODE option in the LDAP session handle.

See Also

ldap_first_message, ldap_count_messages, ldap_msgid, ldap_msgtype, ldap_search, ldap_search_ext, ldap_search_ext_s, ldap_search_s, ldap_search_st