ldap_encode_sort_controlW function (winldap.h)

The ldap_encode_sort_control function formats a list of sort keys into a search control. This function is obsolete. Instead, use ldap_create_sort_control.

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_encode_sort_controlW(
  [in]  PLDAP         ExternalHandle,
  [in]  PLDAPSortKeyW *SortKeys,
  [out] PLDAPControlW Control,
  [in]  BOOLEAN       Criticality
);

Parameters

[in] ExternalHandle

The session handle.

[in] SortKeys

A list of LDAPSortKey structures.

[out] Control

Pointer to the new control.

[in] Criticality

Notifies the server whether this control is critical to the search.

Return value

If the call completed successfully, LDAP_SUCCESS is returned. Other standard LDAP return values, such as LDAP_NO_MEMORY or LDAP_PARAM_ERROR, may also be returned.

Remarks

Note

The winldap.h header defines ldap_encode_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

LDAPSortKey

ldap_create_sort_control