Table of Contents | Previous | Next | Index

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

ldap_result2error()

ldap_result2error() returns the corresponding error code for a result produced by the ldap_result() and ldap_search_s() functions.

Note that although this function is still supported in the Netscape Directory SDK 3.0 for C release for backward-compatibility, its use is deprecated. (See "Backward Compatibility with Earlier Releases" on page 20.)

If you are writing a new client, you should use the ldap_parse_result() function instead.

Syntax

#include <ldap.h>
int ldap_result2error( LDAP *ld, LDAPMessage *r, int freeit );

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.

r

Pointer to the LDAPMessage structure representing the results returned by the ldap_result() or ldap_search() function.

freeit

Specifies whether or not the result should be freed after the error code is extracted. The parameter can have the following possible values:

Returns

One of the following values:

Example

See the example under ldap_result().

See Also

ldap_parse_result(), ldap_get_lderrno(), ldap_err2string(), ldap_result(), ldap_set_lderrno().


Table of Contents | Previous | Next | Index

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