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 new control.
IsCritical
[in] Notifies the server whether or not this control is critical to the search.

Return Values

If the call completed successfully, LDAP_SUCCESS is returned. Other standard LDAP return values, such as LDAP_NO_MEMORY or LDAP_PARAM_ERROR, may also be returned.

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.
Unicode: Implemented as Unicode and ANSI versions on all platforms.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.

See Also

Functions, ldap_create_sort_control, LDAPSortKey