ldap_create_sort_control (Windows Embedded CE 6.0)
1/6/2010
This function formats a list of sort keys into a search control.
Syntax
ULONG ldap_create_sort_control(
LDAP* ExternalHandle,
LDAPSortKey** SortKeys,
UCHAR IsCritical,
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 Value
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_freefunction.
Requirements
Header | winldap.h |
Library | wldap32.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |