ldap_parse_sort_controlW function (winldap.h)

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

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_parse_sort_controlW(
  PLDAP         ExternalHandle,
  PLDAPControlW *Control,
  ULONG         *Result,
  PWCHAR        *Attribute
);

Parameters

ExternalHandle

The session handle.

Control

The control returned from the server, as obtained from a call to ldap_parse_result.

Result

The result code.

Attribute

A pointer to a null-terminated string that contains the name of the attribute that caused the operation to fail.

Return value

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

Note

The winldap.h header defines ldap_parse_sort_control as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header winldap.h
Library Wldap32.lib
DLL Wldap32.dll

See also

Functions

Return Values

ldap_memfree

ldap_parse_result