Platform SDK: Active Directory, ADSI, and Directory Services

ldap_encode_sort_control

The ldap_encode_sort_control function formats a list of sort keys into a search control. This function is obsolete. Instead, use ldap_create_sort_control.

ULONG ldap_encode_sort_control (
  PLDAP ExternalHandle,
  PLDAPSortKey* SortKeys,
  PLDAPControl Control,
  BOOLEAN IsCritical
);

Parameters

ExternalHandle
[in] The session handle.
SortKeys
[in] A list of LDAPSortKey structures.
Control
[out] Pointer to the newly created control.
IsCritical
[in] Tells the server whether or not this control is critical to the search.

Return Values

Value Meaning
LDAP_SUCCESS The call was completed successfully.
LDAP_UNAVAILABLE_CRIT_EXTENSION The control is critical and the server does not support the control.

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_create_sort_control, LDAPSortKey