Skip to content

Latest commit

 

History

History
105 lines (74 loc) · 4.43 KB

nf-winldap-cldap_open.md

File metadata and controls

105 lines (74 loc) · 4.43 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.cldap_open
cldap_open function (winldap.h)
The cldap_open function (winldap.h) establishes a session with an LDAP server over a connectionless User Datagram Protocol (UDP) service.
_ldap_cldap_open
cldap_open
cldap_open function [LDAP]
cldap_openA
cldap_openW
ldap.cldap__open
ldap.cldap_open
winldap/cldap_open
winldap/cldap_openA
winldap/cldap_openW
ldap\cldap_open.htm
ldap
9dc62bb8-8569-4682-bfc7-7721af287318
08/08/2022
_ldap_cldap_open, cldap_open, cldap_open function [LDAP], cldap_openA, cldap_openW, ldap.cldap__open, ldap.cldap_open, winldap/cldap_open, winldap/cldap_openA, winldap/cldap_openW
winldap.h
Windows
Windows Vista
Windows Server 2008
cldap_openW (Unicode) and cldap_openA (ANSI)
Wldap32.lib
Wldap32.dll
Windows
19H1
cldap_open
winldap/cldap_open
c++
APIRef
kbSyntax
DllExport
Wldap32.dll
cldap_open
cldap_openA
cldap_openW

cldap_open function

-description

The cldap_open function establishes a session with an LDAP server over a connectionless User Datagram Protocol (UDP) service. This is an alternate to using TCP/IP.

-parameters

-param HostName [in]

A pointer to a null-terminated string that contains a list of host names or dotted strings that represent the IP address of LDAP server hosts. Use a single space to separate the host names in the list. Each host name in the list may be followed by a port number. The optional port number is separated from the host itself with a colon (:). The LDAP run time attempts connection with the hosts in the order listed, stopping when a successful connection is made.

-param PortNumber [in]

The port number to be used. If no port number is specified, the default is port 389, which is defined as LDAP_PORT. If port numbers are included in the HostName parameter, this parameter is ignored.

-returns

If the function succeeds, a session handle, in the form of a pointer to an LDAP structure is returned. Free the session handle with a call to ldap_unbind when it is no longer required.

If the function fails, the return value is NULL. To get the error code, call LdapGetLastError or the Win32 function GetLastError.

-remarks

The cldap_open function, unlike ldap_open, creates a connection block for UDP-based connectionless LDAP services. No TCP session is maintained. Like ldap_open, cldap_open allocates an LDAP structure to maintain state data for the session, and then attempts to make the connection before returning to the caller. The call returns a session handle, which you pass to subsequent LDAP function calls in the course of the session. When finished with the session, always free the allocated session handle by using ldap_unbind.

Using LDAP over UDP does not support binding and does not support TLS (SSL) or SASL.

Multithreading: Calls to cldap_open are thread-safe.

Note  When using cldap_open, the connection is opened by an anonymous user. The only available operations are those that an anonymous user can run.
 

-see-also

Functions

GetLastError

LdapGetLastError

ldap_open

ldap_unbind