cldap_open (Windows CE 5.0)
This function establishes a session with a Lightweight Directory Access Protocol (LDAP) server over a connectionless User Datagram Protocol (UDP) service.
LDAP* cldap_open(UNICODE PTCHARHostName,ULONGPortNumber);
Parameters
- HostName
[in] List of host names or dotted strings representing 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 (:) character. The LDAP run time attempts connection with the hosts in the order listed, stopping when a successful connection is made. - PortNumber
[in] Contains a host's port number. If no port number is specified, the default is port 389. If a host includes a port number, this parameter is ignored.
Return Values
If this function succeeds, the return value is a session handle, in the form of a pointer to an LDAP structure.
If this function fails, the return value is NULL. To retrieve the error code, call LdapGetLastError or GetLastError.
Remarks
This function, unlike ldap_open, creates a connection block for UDP-based connectionless LDAP services. No TCP session is maintained. Like ldap_open, this function allocates an LDAP structure to maintain state information 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.
In a multithreading environment, calls to this function are thread-safe.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Winldap.h.
Link Library: Wldap32.lib.
See Also
Send Feedback on this topic to the authors