ldap_create_sort_control (Windows CE 5.0)
This function formats a list of sort keys into a search control.
ULONG ldap_create_sort_control(LDAP*ExternalHandle,LDAPSortKey** SortKeys,UCHARIsCritical,LDAPControl** Control);
Parameters
- ExternalHandle
[in] Session handle. - SortKeys
[in] Pointer to an array of LDAPSortKey structures. Each structure in the array specifies the name of an attribute to use as a sort key, the matching rule for that key, and whether the sort order is ascending or descending. - IsCritical
[in] Tells the server whether this control is critical to the search. 0 ==> False, !0 ==> True. - Control
[out] Pointer to the newly created control.
Return Values
The following table shows the possible return values.
Value | Description |
---|---|
LDAP_SUCCESS | The call completed successfully. |
LDAP_UNAVAILABLE_CRIT_EXTENSION | The control is critical and the server does not support the control. |
Remarks
This function creates a simple 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.
To free the control when it is no longer needed, call the ldap_control_free function.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Winldap.h.
Link Library: Wldap32.lib.
See Also
ldap_control_free | LDAPSortKey
Send Feedback on this topic to the authors