Platform SDK: Active Directory, ADSI, and Directory Services

IDsBrowseDomainTree::SetComputer

The IDsBrowseDomainTree::SetComputer method specifies a computer and credentials needed by other methods of this interface to successfully retrieve information against that computer.

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

Parameters

pszComputerName
[in] The name of the computer to be targeted at.
pszUserName
[in] User name as part of credentials for logging on to the computer.
pszPassword
[in] User password as part of credentials for logging on to the computer.

Return Values

This method returns an HRESULT value.

Remarks

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

If within one instance you need to call this (SetComputer) method multiple times targeted at different computers, you need to call FlushCachedDomains before each use.

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, DOMAINDESC, DOMAINTREE, IDsBrowseDomainTree, IDsBrowseDomainTree::FlushCachedDomains