Directory Services |
The DsGetForestTrustInformationW function obtains forest trust data for a specified domain.
DWORD DsGetForestTrustInformationW( LPCWSTR ServerName, LPCWSTR TrustedDomainName, DWORD Flags, PLSA_FOREST_TRUST_INFORMATION* ForestTrustInfo );
If this parameter is NULL, the forest trust data for the domain hosted by ServerName is retrieved.
Value | Meaning |
---|---|
DS_GFTI_UPDATE_TDO | If this flag is set,
DsGetForestTrustInformationW will update the forest trust
data of the trusted domain identified by the
TrustedDomainName parameter. In this case, the
TrustedDomainName parameter cannot be NULL. The caller must
have access to modify the trust data or ERROR_ACCESS_DENIED is
returned.
This flag is only valid if ServerName specifies the primary domain controller of the domain. |
The caller must free this structure when it is no longer required by calling NetApiBufferFree.
Return Code | Description |
---|---|
ERROR_INVALID_FLAGS | The Flags parameter contains one or more invalid flags. |
ERROR_INVALID_FUNCTION | The domain specified by TrustedDomainName does not have the TRUST_ATTRIBUTE_FOREST_TRANSITIVE trust attribute on the trusted domian controller. |
ERROR_NO_SUCH_DOMAIN | The domain specified by TrustedDomainName does not exist or does not have that TRUST_ATTRIBUTE_FOREST_TRANSITIVE trust attribute on the server identified by the ServerName parameter. |
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Unicode: Implemented as Unicode version only.
Header: Declared in Dsgetdc.h.
Library: Use Netapi32.lib.
TRUSTED_DOMAIN_INFORMATION_EX, Directory Service Functions, NetApiBufferFree