Platform SDK: Active Directory, ADSI, and Directory Services |
The cldap_open function establishes a session with an LDAP server over a connectionless user datagram protocol (UDP) service.
LDAP* cldap_open( PCHAR HostName, ULONG PortNumber );
If the function succeeds, the return value is a session handle, in the form of a pointer to an LDAP structure.
If the function fails, the return value is NULL. To retrieve the error code, call LdapGetLastError or the Win32 function GetLastError.
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 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.
Multithreading: Calls to cldap_open are thread-safe.
Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.
Unicode: Declared as Unicode and ANSI prototypes.