ldap_set_option (Compact 2013)
3/26/2014
This function sets options on connection blocks.
Syntax
ULONG ldap_set_option(
LDAP* ld,
int option,
void* invalue
);
Parameters
- ld
[in] Session handle.
- option
[in] Name of the session option being set. For more information, see Session Options.
- invalue
[in] Pointer to the value that the option is to be given. The actual type of this parameter depends on the setting of the option parameter. The constants LDAP_OPT_ON and LDAP_OPT_OFF can be given for options that have on or off settings.
Return Value
If this function succeeds, the return value is LDAP_SUCCESS.
If this function fails, it returns an error code. See the LDAP_RETCODE enumeration for a list of possible return values.
Remarks
Call this function to access the LDAP structure that represents an LDAP session. Do not attempt to modify the LDAP data structure directly.
To enable signing/sealing, you have to turn on one of the following options prior to calling ldap_bind_s.
#define LDAP_OPT_SIGN 0x95
#define LDAP_OPT_ENCRYPT 0x96
To turn off signing/sealing, you have to close the connection by calling the ldap_unbind function on the connection handle.
In a multithreading environment, calls to ldap_set_option are not thread-safe because it affects the connection as a whole.
Requirements
Header |
winldap.h |
Library |
wldap32.lib |
See Also
Reference
LDAP Session Functions
LDAP_RETCODE
LDAP
ldap_bind_s
ldap_get_option
ldap_unbind