Platform SDK: TAPI

ITDirectory::Bind

Binds to the server.

HRESULT Bind(
  BSTR pDomainName,
  BSTR pUserName,
  BSTR pPassword,
  long lFlags
);

Parameters

pDomainName
[in] Pointer to a BSTR containing the user's domain name.
pUserName
[in] Pointer to a BSTR containing the user's name.
pPassword
[in] Pointer to a BSTR containing the user's password.
lFlags
[in] RENDBIND flags indicator of whether all parameters must be validated or can take a default.

Return Values

Value Meaning
S_OK Method succeeded.
E_POINTER The pDomainName, pUserName, or pPassword parameter is not a valid pointer.
E_INVALIDARG A password is required but was not supplied, the domain and user are not supplied, or the domain was supplied but the user was not.
RND_NOT_CONNECTED The ITDirectory::Connect method has not been invoked or did not succeed.

Remarks

The input variables pDomainName, pUserName, and pPassword can be NULL.

Calling this function is optional. However, some directory operations require the user to be authenticated first. It is always safe to call Bind.

The application must use SysAllocString to allocate memory for the pDomainName, pUserName, and pPassword parameters. The application must use SysFreeString to free the memory when the variables are no longer needed.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Version: Requires TAPI 3.0 or later.
  Header: Declared in Rend.h.
  Library: Use Rendid.lib.

See Also

ITDirectory