Platform SDK: Active Directory, ADSI, and Directory Services |
The ldap_sslinit function initializes a secure sockets layer (SSL) session with an LDAP server.
LDAP* ldap_sslinit( PCHAR HostName, ULONG PortNumber, int secure );
If the function succeeds, it returns a session handle, in the form of a pointer to an LDAP structure.
If the function fails, the return value is NULL.Use LdapGetLastError to retrieve the error code.
Call ldap_sslinit to create a connection block to a secured LDAP server. The HostName parameter can be NULL in which case the run time attempts to find the "default" LDAP server. The hosts are tried in the order listed, stopping with the first one to which a successful connection is made.
The function allocates an LDAP structure to maintain state information for the session, and returns a handle to this structure. You pass this handle to subsequent LDAP function calls during the course of the session.
Multithreading: Calls to ldap_sslinit are thread-safe.
Microsoft implements security features, like SSL, through its SSPI capabilities.
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.
Functions, LDAP, LdapGetLastError, SSPI Options for Distributed Applications