Directory Services

IDsBrowseDomainTree::SetComputer

The IDsBrowseDomainTree::SetComputer method specifies the computer and credentials to be used by this instance of the IDsBrowseDomainTree interface.

HRESULT SetComputer( 
  LPWCSTR pszComputerName,
  LPCWSTR pszUserName,
  LPCWSTR pszPassword
);

Parameters

pszComputerName
[in] Pointer to a null-terminated Unicode string that contains the name of the target computer.
pszUserName
[in] Pointer to a null-terminated Unicode string that contains the user name used to access the computer.
pszPassword
[in] Pointer to a null-terminated Unicode string that contains the password used to access the computer.

Return Values

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

Remarks

If this method is not called, the local host is assumed as the default computer.

When SetComputer is called on a particular IDsBrowseDomainTree instance, IDsBrowseDomainTree::FlushCachedDomains must be called before SetComputer is called again.

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

IDsBrowseDomainTree::FlushCachedDomains, IDsBrowseDomainTree