DsMergeForestTrustInformationW function (dsgetdc.h)

The DsMergeForestTrustInformationW function merges the changes from a new forest trust data structure with an old forest trust data structure.

Syntax

DSGETDCAPI DWORD DsMergeForestTrustInformationW(
  [in]           LPCWSTR                       DomainName,
  [in]           PLSA_FOREST_TRUST_INFORMATION NewForestTrustInfo,
  [in, optional] PLSA_FOREST_TRUST_INFORMATION OldForestTrustInfo,
  [out]          PLSA_FOREST_TRUST_INFORMATION *MergedForestTrustInfo
);

Parameters

[in] DomainName

Pointer to a null-terminated Unicode string that specifies the trusted domain to update.

[in] NewForestTrustInfo

Pointer to an LSA_FOREST_TRUST_INFORMATION structure that contains the new forest trust data to be merged. The Flags and Time members of the entries are ignored.

[in, optional] OldForestTrustInfo

Pointer to an LSA_FOREST_TRUST_INFORMATION structure that contains the old forest trust data to be merged. This parameter may be NULL if no records exist.

[out] MergedForestTrustInfo

Pointer to an LSA_FOREST_TRUST_INFORMATION structure pointer that receives the merged forest trust data.

The caller must free this structure when it is no longer required by calling NetApiBufferFree.

Return value

Returns NO_ERROR if successful or a Windows error code otherwise.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header dsgetdc.h
Library Netapi32.lib
DLL Netapi32.dll

See also

Directory Service Functions

NetApiBufferFree