Directory Services |
The ldap_extended_operation_s function enables you to pass extended LDAP operations to the server.
ULONG ldap_extended_operation_s( LDAP* ld, PCHAR Oid, struct berval* Data, PLDAPControl* ServerControls, PLDAPControl* ClientControls, PCHAR* ReturnedOid, struct berval** ReturnedData );
If the function succeeds, LDAP_SUCCESS is returned.
If the function fails, an error code is returned. For more information, see Return Values.
The ldap_extended_operation_s function enables 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.
As a synchronous function, ldap_extended_operation_s returns any response data in the ReturnedOid and ReturnedData fields. When no longer required, free the ReturnedOID string and the ReturnedData buffer by calling ldap_memfree. Because ReturnedData is not a PCHAR data type, it must be explicitly cast when used as an argument of ldap_memfree, such as:
struct berval *pBV; ldap_extended_operation_s(......., &pBV); ... ldap_memfree( (PCHAR) pBV);
Multithreading: The ldap_extended_operation_s function is thread-safe.
Client: Included in Windows XP and Windows 2000
Professional.
Server: Included in Windows Server 2003 family and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows Me/98/95.
Unicode: Implemented as Unicode and ANSI on all
platforms.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.
Functions, ldap_memfree, ldap_extended_operation, Return Values