Platform SDK: Active Directory, ADSI, and Directory Services

ldap_extended_operation

The ldap_extended_operation function allows you to pass extended LDAP operations to the server

ULONG ldap_extended_operation(
  LDAP* ld,
  PCHAR Oid,
  struct berval* Data,
  PLDAPControl* ServerControls,
  PLDAPControl* ClientControls,
  ULONG* MessageNumber
);

Parameters

ld
[in] The session handle.
Oid
[in] The dotted object identifier (OID) text string naming the request.
Data
[in] The arbitrary data required by the operation (if NULL, no data is sent to the server).
ServerControls
[in] A list of LDAP server controls.
ClientControls
[in] A list of client controls.
MessageNumber
[out] The message ID for the request.

Return Values

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

The ldap_extended_operation function allows a client to send an extended request (free for all) to an LDAP 3 (or later) server. The functionality is open and the client request can be for any operation, requiring single or multiple responses.

As an asynchronous function, ldap_extended_operation returns a message ID for the operation. Call ldap_result with the message ID to get the result of the operation. To cancel an asynchronous operation before it has completed, call ldap_abandon.

Because of the open nature of the request, the client must call ldap_close_extended_op to terminate the request.

Multithreading: The ldap_extended_operation function is thread-safe.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Winldap.h.
  Library: Use Wldap32.lib.
  Unicode: Declared as Unicode and ANSI prototypes.

See Also

Functions, ldap_abandon, ldap_close_extended_op, ldap_result, Return Values