Directory Services


The ldap_get_option function retrieves the current values of session-wide parameters.

ULONG ldap_get_option(
  LDAP* ld,
  int option,
  void* outvalue


[in] The session handle.
[in] The name of the option accessed. For more information and a list of allowable options and their values, see the following Remarks section.
[out] The address of the option value. The actual type of this parameter depends on the setting of the option parameter.

Return Values

If the function succeeds, the return value is LDAP_SUCCESS.

If the function fails, it returns an error code. For more information, see Return Values.


For more information and a description of optional settings that apply to an LDAP session, see Session Options. The outvalue value returns a pointer to an allocated block of memory of the type listed in the Session Options table; this memory should be freed using ldap_memfree when the data is no longer required.

Multithreading: The ldap_get_option function is thread-safe.


Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.

See Also

Functions, ldap_memfree, ldap_set_option, Return Values, Session Options, Setting Session Options