CheckLDAPPassword Method

This method attempts to bind a TCP/IP socket to the LDAP server instance running on the machine and port number specified.  If successful, it presents the account name and password to attempt authentication with the LDAP server instance.  This method uses the LDAP protocol when authenticating.

IDL Definition

HRESULT CheckLDAPPassword(
[in] BSTR bstrDS, 
[in] BSTR bstrAcct, 
[in] BSTR bstrPwd, 
[in] unsigned long ulPort
);

Parameters

bstrDS

a name of the machine hosting the LDAP service.  Must be a valid network name or DNS name.  This name will be used to lookup an IP address when binding a TCP/IP socket to the machine hosting the LDAP server.

bstrAcct

the account name to present when authenticating with the LDAP server.

bstrPwd

the account password to present when authenticating with the LDAP server.

ulPort

the port to use when binding the TCP/IP socket to the machine specified by bstrDS.

Return Values

the HRESULT can have one of the following values:

#define Name Description
S_OK success.
TMAIL_E_CONNECT_FAILED a TCP/IP connection could not be established with the target machine.
TMAIL_E_LOGIN_FAILED a connection was established, but the server refused the credentials.


© 1997-1998 Microsoft Corporation. All rights reserved.