Directory Services

ldap_parse_sort_control

The ldap_parse_sort_control function parses the sort control returned by the server.

ULONG ldap_parse_sort_control(
  PLDAP ExternalHandle,
  PLDAPControl* Control,
  ULONG* Result,
  PCHAR* Attribute
);

Parameters

ExternalHandle
[in] The session handle.
Control
[in] The control returned from the server, as obtained from a call to ldap_parse_result.
Result
[out] The result code.
Attribute
[out] A pointer to a null-terminated string that contains the name of the attribute that caused the operation to fail.

Return Values

If the function succeeds, the return value is LDAP_SUCCESS.

If the function fails, it returns an error code. See Return Values for more information.

Remarks

When the server returns the results, it returns a control in the SearchResultDone message. Call ldap_parse_sort_control to parse this sort control.

If the sort operation failed, the server may return the name of the attribute that caused the failure. In this case, call ldap_memfree to free the attribute value

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_memfree, ldap_parse_result, Return Values