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(
  [in]  PLDAP         ExternalHandle,
  [in]  PLDAPControlW *Control,
  [out] ULONG         *Result,
  [out] PWCHAR        *Attribute
);

Parameters

[in] ExternalHandle

The session handle.

[in] Control

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

[out] Result

The result code.

[out] 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

Requirement Value
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