Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_next_message()

Returns a pointer to the next LDAPMessage structure in a chain of search results.

Syntax

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

Parameters

This function has the following parameters:

ld

Connection handle, which is a pointer to an LDAP structure containing information about the connection to the LDAP server.

msg

Pointer to an LDAPMessage structure in a chain of search results.

Returns

One of the following values:

Description

The ldap_next_message() function returns a pointer to the next LDAPMessage structure in a chain of search results.

You can use this function in conjunction with the ldap_first_message() function to iterate through the chain of search results. You can call the ldap_msgtype() function to determine if each message contains a matching entry (a message of the type LDAP_RES_SEARCH_ENTRY) or a search reference (a message of the type LDAP_RES_SEARCH_REFERENCE).

For more information, see "Iterating Through a Chain of Results" on page 124.

Example

See the examples under "Example: Searching the Directory (Synchronous)" on page 146 and "Example: Searching the Directory (Asynchronous)" on page 140.

See Also

ldap_first_message().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23