IDsBrowseDomainTree::SetComputer method (dsclient.h)

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

Syntax

HRESULT SetComputer(
  [in] LPCWSTR pszComputerName,
  [in] LPCWSTR pszUserName,
  [in] LPCWSTR pszPassword
);

Parameters

[in] pszComputerName

Pointer to a null-terminated Unicode string that contains the name of the target computer.

[in] pszUserName

Pointer to a null-terminated Unicode string that contains the user name used to access the computer.

[in] pszPassword

Pointer to a null-terminated Unicode string that contains the password used to access the computer.

Return value

Returns a standard HRESULT value including the following.

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

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header dsclient.h
DLL Dsadmin.dll

See also

IDsBrowseDomainTree

IDsBrowseDomainTree::FlushCachedDomains