Platform SDK: Active Directory, ADSI, and Directory Services

IDsBrowseDomainTree::GetDomains

The IDsBrowseDomainTree::GetDomains method retrieves the trust domains of the given computer in a tree structure.

HRESULT GetDomains(
  PDOMAINTREE *ppDomainTree,
  DWORD dwFlags
);

Parameters

*ppDomainTree
[in] Pointer to a DomainTree data structure.
dwFlags
[in] Flags specifying desired domain contents. This can be a combination of the following:
dwFlags Description
DBDTF_RETURNFQDN If set, pszNCName of DOMAINDESC contains fully qualified domain names, such as "DC=myDom, DC=Fabrikam, DC=com".
DBDTF_RETURNMIXEDDOMAINS Returns downlevel trust domains.
DBDTF_RETURNEXTERNAL Returns external trust domains.
DBDTF_RETURNINBOUND Returns trusting domains; if not set, returns trusted domains.
DBDTF_RETURNINOUTBOUND Returns both trusted and trusting domains.

Return Values

This method returns a HRESULT value.

Remarks

The structure returned by this method should be freed using IDsBrowseDomainTree::FreeDomains.

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::FreeDomains