cldap_openW function (winldap.h)
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.
WINLDAPAPI LDAP *LDAPAPI cldap_openW( [in] PWSTR HostName, [in] ULONG PortNumber );
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.
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.
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.
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.
The winldap.h header defines cldap_open as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|