Directory Services


The IDsBrowseDomainTree::BrowseTo method displays a dialog box used to browse for a domain.

HRESULT BrowseTo( 
  HWND hwndParent,
  LPWSTR* ppszTargetPath,
  DWORD dwFlags


[in] Handle of the window that will be the owner of the domain browser dialog box.
[out] Pointer to a Unicode string pointer that receives the path string of the domain selected in the domain browser. This memory must be freed when it is no longer required by calling CoTaskMemFree. By default, this path takes the form "". If dwFlags contains the DBDTF_RETURNFQDN flag, the path takes the form "DC=myDom, DC=Fabrikam, DC=com".
[in] Contains a set of flags that modify the behavior of the domain browser dialog box. This can be zero or a combination of one or more of the following values.
Value Meaning
DBDTF_RETURNFQDN The domain browser will place the fully-qualified domain name in ppszTargetPath. The fully-qualified domain name takes the form "DC=myDom, DC=Fabrikam, DC=com" as opposed to "".
DBDTF_RETURNMIXEDDOMAINS The domain browser will display downlevel trust domains.
DBDTF_RETURNEXTERNAL The domain browser will display external trust domains.
DBDTF_RETURNINBOUND If this flag is set, the domain browser will display trusting domains. Otherwise, the domain browser will display trusted domains.
DBDTF_RETURNINOUTBOUND The domain browser will display both trusted and trusting domains.

Return Values

Returns a standard HRESULT value including the following.
The domain browser was successful.
The user cancelled the domain browser dialog box.
ppszTargetPath is invalid.
A memory allocation failure occurred.


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

CoTaskMemFree, IDsBrowseDomainTree