ldap_get_option function (winldap.h)

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

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_get_option(
  [in]  LDAP *ld,
  [in]  int  option,
  [out] void *outvalue
);

Parameters

[in] ld

The session handle.

[in] option

The name of the option accessed. For more information and a list of allowable options and their values, see the following Remarks section.

[out] outvalue

The address of the option value. The actual type of this parameter depends on the setting of the option parameter.

Return value

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.

Remarks

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, unless it is explicitly mentioned in the Session Options table not to free the returned memory.

Note  LDAP_OPT_ERROR_STRING returns a pointer to an internal static string table, and ldap_memfree should not be called when using this session option.
 
Multithreading: The ldap_get_option function is thread-safe.

Requirements

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header winldap.h
Library Wldap32.lib
DLL Wldap32.dll

See also

Functions

Getting and Setting Session Options

Return Values

Session Options

ldap_memfree

ldap_set_option