Directory Services

LDAPSortKey

The LDAPSortKey structure stores sorting criteria for use by sort controls.

typedef struct ldapsortkey {
PWCHAR sk_attrtype;
PWCHAR sk_matchruleoid;
BOOLEAN sk_reverseorder; } LDAPSortKey,
*PLDAPSortKey;

Members

sk_attrtype
Pointer to a null-terminated string that specifies the name of the attribute to use as a sort key. Use multiple LDAPSortKey structures to specify multiple sort keys. Be aware that Active Directory supports only a single sort key.
sk_matchruleoid
Pointer to a null-terminated string that specifies the object identifier of the matching rule for the sort. Should be set to NULL if you do not want to explicitly specify a matching rule for the sort. Specifying an explicitly set matching rule is supported only by Windows XP clients and the Windows Server 2003 family.
sk_reverseorder
If TRUE, specifies that the sort be ordered from lowest to highest. If FALSE, the sort order is from highest to lowest.

Remarks

The ldap_create_sort_control and ldap_search_init_page functions use this structure to specify how results should be sorted before being returned to the client.

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: Declared as Unicode and ANSI structures.
Header: Declared in Winldap.h.

See Also

Data Structures, ldap_create_sort_control, ldap_search_init_page, Using Controls, LDAP_SERVER_SORT_OID