Directory Services

IDsDisplaySpecifier::SetServer

The IDsDisplaySpecifier::SetServer method specifies the server from which display specifier data is obtained.

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

Parameters

pszServer
[in] Pointer to a null-terminated Unicode string that contains the name of the server that will be used to obtain the display specifier data.
pszUserName
[in] Pointer to a null-terminated Unicode string that contains the user name to be used for access to the server specified in pszServer.
pszPassword
[in] Pointer to a null-terminated Unicode string that contains the password used to access the server specified in pszServer.
dwFlags
[in] Contains a set of flags used to bind to the directory service. This can be zero or a combination of one or more of the following values.
Value Meaning
DSSSF_SIMPLEAUTHENTICATE The IDsDisplaySpecifier object uses simple authentication instead of secure authentication.
DSSSF_DSAVAILABLE The IDsDisplaySpecifier object will not check whether the directory server is available.

Return Values

Returns a standard HRESULT value including the following.
Return Code Description
S_OK The method was successful.
E_OUTOFMEMORY A memory allocation failure occurred.

Remarks

The server data is cached by the IDsDisplaySpecifier object. The IDsDisplaySpecifier object does not actually bind to the server until a specific method, such as IDsDisplaySpecifier::GetDisplaySpecifier, is called.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Header: Declared in Dsclient.h.

See Also

IDsDisplaySpecifier::GetDisplaySpecifier, IDsDisplaySpecifier, Active Directory Display Interfaces