Platform SDK: Active Directory, ADSI, and Directory Services

ldap_err2string

The ldap_err2string function converts a numeric LDAP error code into a character string describing the error.

PCHAR ldap_err2string(
  ULONG err
);

Parameters

err
[in] An LDAP error code as returned by another LDAP function.

Return Values

If the function succeeds, it returns a pointer to a character string describing the error.

If the function fails, it returns a pointer to NULL.

Remarks

Call ldap_err2string to convert the numeric LDAP error code returned by one of the ldap_parse_*_result routines, or by one of the synchronous operation calls, into an informative, null-terminated character string message describing the error.

The return value is a static pointer to the character string. Do not free this string.

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.
  Unicode: Declared as Unicode and ANSI prototypes.

See Also

Functions, Return Values