ldap_result2error function (winldap.h)

The ldap_result2error function parses a message and returns the error code.

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_result2error(
  [in] LDAP        *ld,
  [in] LDAPMessage *res,
  [in] ULONG       freeit
);

Parameters

[in] ld

The session handle.

[in] res

The result of an LDAP operation, as returned by

ldap_result, or one of the synchronous API operation calls.

[in] freeit

Determines whether the LDAPMessage, pointed to by the res parameter, is freed. Setting freeit to TRUE frees the message by calling the ldap_msgfree function.

Return value

If the function succeeds, the return value is LDAP_SUCCESS.

If the function fails, it returns an error code. For more information, see

Return Values.

Remarks

Multithreading: Calls to ldap_result2error are thread-safe.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header winldap.h
Library Wldap32.lib
DLL Wldap32.dll

See also

Functions

Return Values

ldap_msgfree

ldap_result