Platform SDK: Active Directory, ADSI, and Directory Services |
The ldap_simple_bind_s function authenticates a client to a server, using a clear text password.
ULONG ldap_simple_bind_s( LDAP* ld, PCHAR dn, PCHAR passwd );
If the function succeeds, the return value is LDAP_SUCCESS.
If the function fails, it returns an error code. See Return Values for more information.
The ldap_simple_bind_s function initiates a simple synchronous bind operation to authenticate a client to an LDAP server. Subsequent bind calls can be used to re-authenticate over the same connection.
Upon completion of the bind operation, ldap_simple_bind_s returns to the caller. Use ldap_simple_bind if you prefer to have the operation carried out asynchronously. Note, however, that if an LDAP 2 server is contacted, no other operations over the connection should be attempted before the bind call has successfully completed.
Multithreading: Bind calls are not safe because they apply to the connection as a whole. Use caution if threads share connections, and try to thread binds with other operations.
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_bind, ldap_bind_s, ldap_simple_bind, Return Values