Export (0) Print
Expand All

LsaSetTrustedDomainInfoByName function

The LsaSetTrustedDomainInfoByName function sets values for a TrustedDomain object.

Syntax


NTSTATUS LsaSetTrustedDomainInfoByName(
  _In_  LSA_HANDLE PolicyHandle,
  _In_  PLSA_UNICODE_STRING TrustedDomainName,
  _In_  TRUSTED_INFORMATION_CLASS InformationClass,
  _In_  PVOID Buffer
);

Parameters

PolicyHandle [in]

A handle to a Policy object. The security descriptor of the trusted domain object determines whether the caller's changes are accepted. For information about policy object handles, see Opening a Policy Object Handle.

TrustedDomainName [in]

Name of the trusted domain to set values for. This can either be the domain name or the flat name.

InformationClass [in]

Specifies the type of information to set. Specify one of the following values.

ValueMeaning
TrustedPosixInformation

Posix offset of the trusted domain.

TrustedDomainInformationEx

Extended trust information, including the basic information and DNS domain name, and attributes about the trust.

TrustedDomainAuthInformation

Authentication information for the trust, including authentication information for both the inbound and outbound side of the trust (if it exists).

TrustedDomainFullInformation

Full information, including the Posix offset and the authentication information.

 

Buffer [in]

Pointer to a structure that contains the information to set. The type of structure depends on the value of the InformationClass parameter.

Return value

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code. For more information, see the "LSA Policy Function Return Values" section of Security Management Return Values.

You can use the LsaNtStatusToWinError function to convert the NTSTATUS code to a Windows error code.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ntsecapi.h

Library

Advapi32.lib

DLL

Advapi32.dll

See also

LsaQueryTrustedDomainInfoByName
TRUSTED_DOMAIN_INFORMATION_EX
TRUSTED_INFORMATION_CLASS

 

 

Community Additions

ADD
Show:
© 2014 Microsoft