Skip to content

Latest commit

 

History

History
125 lines (84 loc) · 4.38 KB

nf-winldap-ldap_set_option.md

File metadata and controls

125 lines (84 loc) · 4.38 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winldap.ldap_set_option
ldap_set_option function (winldap.h)
The ldap_set_option function (winldap.h) sets options on connection blocks.
_ldap_ldap_set_option
ldap.ldap__set__option
ldap.ldap_set_option
ldap_set_option
ldap_set_option function [LDAP]
ldap_set_optionW
winldap/ldap_set_option
winldap/ldap_set_optionW
ldap\ldap_set_option.htm
ldap
b6d6b285-7302-4812-bbcb-0aeb5b53cf23
08/04/2022
_ldap_ldap_set_option, ldap.ldap__set__option, ldap.ldap_set_option, ldap_set_option, ldap_set_option function [LDAP], ldap_set_optionW, winldap/ldap_set_option, winldap/ldap_set_optionW
winldap.h
Windows
Windows Vista
Windows Server 2008
ldap_set_optionW (Unicode) and ldap_set_option (ANSI)
Wldap32.lib
Wldap32.dll
Windows
19H1
ldap_set_option
winldap/ldap_set_option
c++
APIRef
kbSyntax
DllExport
Wldap32.dll
ldap_set_option
ldap_set_option
ldap_set_optionW

ldap_set_option function

-description

The ldap_set_option function sets options on connection blocks. For more information about structures, see Data Structures.

-parameters

-param ld [in]

The session handle.

-param option [in]

The name of the option set.

-param invalue [in]

A 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.

-returns

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

Call ldap_set_option to access the LDAP structure that represents an LDAP session. Do not attempt to modify the LDAP data structure directly.

For more information and a description of optional settings that apply to an LDAP session, see Session Options. For more information about flags, see DsGetDcName.

It is now possible to digitally sign or encrypt all of your LDAP traffic to and from a Windows LDAP server using the Kerberos authentication protocol. This new feature provides integrity and confidentiality required by some applications. Be aware that using Secure Sockets Layer (SSL) will give you the same benefits, but requires extensive certificate enrollments for the server and, sometimes, for the client.

To enable signing and sealing, you have to turn on one of the following options prior to calling ldap_bind_s with LDAP_AUTH_NEGOTIATE for the bind method.

#define LDAP_OPT_SIGN      0x95
#define LDAP_OPT_ENCRYPT   0x96

To turn off signing and sealing, close the connection by calling ldap_unbind() on the connection handle.

Multithreading: Calls to ldap_set_option are unsafe because it affects the connection as a whole. Use caution if threads share connections.

-see-also

DsGetDcName

Functions

Getting and Setting Session Options

LDAP

Return Values

ldap_get_option