Directory Services

ldap_result2error

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

ULONG ldap_result2error(
  LDAP* ld,
  LDAPMessage* res,
  ULONG freeit
);

Parameters

ld
[in] The session handle.
res
[in] The result of an LDAP operation, as returned by ldap_result, or one of the synchronous API operation calls.
freeit
[in] 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 Values

If the function succeeds, the return value is LDAP_SUCCESS.

If the function fails, it returns an error code. Fore more information, see Return Values.

Remarks

Multithreading: Calls to ldap_result2error are thread-safe.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.

See Also

Functions, ldap_msgfree, ldap_result, Return Values