ldap_cancel_ext

Cancels an asynchronous LDAP operation already in progress using LDAP client or server controls. The LDAP Cancel operation should be used instead of the LDAP abandon operation when the client needs to know the results.

LDAP Version:v3
Library:*ldapsdk.*
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>int ldap_cancel_ext (
  LDAP *ld,
  int msgid,
  LDAPControl **serverctrls,
  LDAPControl **clientctrls,
  Int           *msgidp);
  

Parameters

ld

(IN) Points to the handle for the LDAP session.

msgid

(IN) Specifies the message ID of the asynchronous LDAP operation to cancel.

serverctrls

(IN) Points to a list of LDAP server controls to use with the abandon operation. Use NULL to specify no server controls.

clientctrls

(IN) Points to an array of LDAPControl structures that list the client controls to use with the abandon operation. Use NULL to specify no client controls.

msgidp

(OUT) Points to the message ID of the request if the search request succeeds.

Return Values

0x00

LDAP_SUCCESS

Non-zero

Failure. For a complete list, see LDAP Return Codes.

0x51

LDAP_SERVER_DOWN

0x53

LDAP_ENCODING_ERROR

0x59

LDAP_PARAM_ERROR

0x5A

LDAP_NO_MEMORY

0X76

LDAP_CANCELED

0X77

LDAP_CANCEL_NO_SUCH_OPERATION

0X78

LDAP_CANCEL_TOO_LATE

0X79

LDAP_CANCEL_CANNOT_CANCEL

Remarks

The msgid parameter must specify a message ID returned by an outstanding asynchronous LDAP operation, such as ldap_search or ldap_modify.

The ldap_cancel_ext function checks to see if the results of the operation have already come in.

  • If not, it sends an LDAP cancel operation to the LDAP server.

  • If the results have already come in, the LDAP operation cannot be cancelled.

eDirectory currently does not support any controls to use with a cancel operation.

See Also

ldap_add_ext_s