Platform SDK: Active Directory, ADSI, and Directory Services

IDsDisplaySpecifier::SetServer

The IDsDisplaySpecifier::SetServer method allows you to specify a preferred server from which display specifiers are to be retrieved. You must specify user credentials required for binding.

HRESULT SetServer(
  LPCWSTR pszServer,
  LPCWSTR pszUserName,
  LPCWSTR pszPassword,
  DWORD dwFlags
);

Parameters

pszServer
[in] Server from which a display information are to be retrieved.
pszUserName
[in] User name as part of the credentials for logging on to the specified server.
pszPassword
[in] Password of the user as part of the credentials for logging on to the server.
dwFlags
[in] Flags used for binding to the directory service. This can be a combination of the following:
dwFlags Description
DSSF_SIMPLEAUTHENTICATE Use simple bind, instead of secure authentication.
DSSF_DsAVAILABLE Ignore checking whether the directory server is available.

Return Values

The method returns an HRESULT value.

Remarks

The information is store in the object's cache. Actual binding does not take place until you call the IDsDisplaySpecifier::GetDisplaySpecifier method later.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Dsclient.h.
  Library: Included as a resource in Dsuiext.dll.

See Also

Active Directory Display Interfaces, IDsDisplaySpecifier, IDsDisplaySpecifier::GetDisplaySpecifier