Export (0) Print
Expand All
Expand Minimize

LsaSetForestTrustInformation function

The LsaSetForestTrustInformation function sets the forest trust information for a specified Local Security Authority TrustedDomain object.

Syntax


NTSTATUS NTAPI LsaSetForestTrustInformation(
  _In_   LSA_HANDLE PolicyHandle,
  _In_   PLSA_UNICODE_STRING TrustedDomainName,
  _In_   PLSA_FOREST_TRUST_INFORMATION ForestTrustInfo,
  _In_   BOOLEAN CheckOnly,
  _Out_  PLSA_FOREST_TRUST_COLLISION_INFORMATION *CollisionInfo
);

Parameters

PolicyHandle [in]

A handle to the Policy object for the system.

TrustedDomainName [in]

Pointer to an LSA_UNICODE_STRING structure that contains the name of the TrustedDomain object to which to set the forest trust information specified by the ForestTrustInfo parameter.

ForestTrustInfo [in]

Pointer to an LSA_FOREST_TRUST_INFORMATION structure that contains the forest trust information to set to the TrustedDomain object specified by the TrustedDomainName parameter.

CheckOnly [in]

Boolean value that specifies whether changes to the TrustedDomain object are persisted. If this value is TRUE, this function will check for collisions with the specified parameters but will not set the forest trust information specified by the ForestTrustInfo parameter to the TrustedDomain object specified by the TrustedDomainName parameter. If this value is FALSE, the forest trust information will be set to the TrustedDomain object.

CollisionInfo [out]

Pointer to a pointer to an LSA_FOREST_TRUST_COLLISION_INFORMATION structure that returns information about any collisions that occurred.

Return value

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code, which can be one of the following values or one of the LSA Policy Function Return Values.

Return code/valueDescription
STATUS_INVALID_DOMAIN_STATE

The operation is legal only on domain controllers in the root domain.

STATUS_INVALID_DOMAIN_ROLE

The operation is legal only on the primary domain controller.

 

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ntsecapi.h

Library

Advapi32.lib

DLL

Advapi32.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft