Decodes the information returned from a search operation that used a server-side sort control.
#include <ldap.h>
int ldap_parse_sort_control (
LDAP *ld,
LDAPControl **ctrls,
unsigned long *returnCode,
char **attribute);
(IN) Points to the handle of the LDAP session.
(IN) Points to the address of a NULL-terminated array of LDAPControl structures, usually obtained by a call to the ldap_parse_result function.
(OUT) Points to the sort control result code. This parameter must not be NULL. See Remarks for a list of possible return codes.
(OUT) If the sort operation fails, the server may return a string that indicates the first attribute in the sortKey list that caused the failure. If this parameter is NULL, no string is returned. If a string is returned, the memory should be freed by calling the ldap_memfree function.
|
0x00 |
LDAP_SUCCESS |
|
Non-zero |
Failure. See |
The returnCode parameter returns one of the following values.
For example code, see sortcntl.c and vlvcntl.c.