Platform SDK: Active Directory, ADSI, and Directory Services

ldap_parse_sort_control

The ldap_parse_sort_control function parses the sort control returned by the server.

ULONG ldap_parse_sort_control (
  PLDAP ExternalHandle,
  PLDAPControl* Control,
  ULONG* Result,
  PCHAR* Attribute
);

Parameters

ExternalHandle
[in] The session handle.
Control
[in]The control returned from the server, as obtained from a call to ldap_parse_result.
Result
[out]The result code.
Attribute
[out]The name of the attribute that caused the operation to fail.

Return Values

If the function succeeds, the return value is LDAP_SUCCESS.

If the function fails, it returns an error code. See Return Values for more information.

Remarks

When the server returns the results, it returns a control in the SearchResultDone message. Call ldap_parse_sort_control to parse this sort control.

If the sort operation failed, the server may return the name of the attribute that caused the failure. In this case, call ldap_memfree to free the attribute value

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, ldap_memfree, ldap_parse_result, Return Values