Directory Services |
The ldap_create_sort_control function is used to format a list of sort keys into a search control. Support for controls is available effective with LDAP 3, but whether the sort control is supported or not is dependent on the particular server.
ULONG ldap_create_sort_control( PLDAP ExternalHandle, PLDAPSortKey* SortKeys, UCHAR IsCritical, PLDAPControl* Control );
Return Code | Description |
---|---|
LDAP_SUCCESS | The call completed successfully. |
The ldap_create_sort_control function creates a basic sort control. Such a control is useful when the LDAP client has limited functionality and cannot sort results, yet needs them sorted.
The sort controls allow a server to return a result code for the sorting of the results that is independent of the result code returned for the search operation.
This function creates the control — it does not verify that the server supports it, and consequently, does not return LDAP_UNAVAILABLE_CRIT_EXTENSION if the server does not support the control. However, it can return other standard LDAP return values, such as LDAP_NO_MEMORY or LDAP_PARAM_ERROR.
To free the control when it is no longer required, call ldap_control_free.
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.
Functions, ldap_control_free, LDAPSortKey, LDAP_SERVER_SORT_OID