3.1.4.7.6 LsarSetTrustedDomainInfoByName (Opnum 49)

The LsarSetTrustedDomainInfoByName method is invoked to set information about a trusted domain object by its string name.

 NTSTATUS LsarSetTrustedDomainInfoByName(
   [in] LSAPR_HANDLE PolicyHandle,
   [in] PRPC_UNICODE_STRING TrustedDomainName,
   [in] TRUSTED_INFORMATION_CLASS InformationClass,
   [in, switch_is(InformationClass)] 
     PLSAPR_TRUSTED_DOMAIN_INFO TrustedDomainInformation
 );

PolicyHandle: An RPC context handle obtained from either LsarOpenPolicy or LsarOpenPolicy2.

TrustedDomainName: The name of the trusted domain object to set information on.

InformationClass: One of the TRUSTED_INFORMATION_CLASS values indicating the type of information the caller is trying to set.

TrustedDomainInformation: The data being set.

Return Values: The following is a summary of the return values that an implementation MUST return, as specified by the message processing that follows.

Return value/code

Description

0x00000000

STATUS_SUCCESS

The request was successfully completed.

0xC0000022

STATUS_ACCESS_DENIED

The caller does not have the permissions to perform this operation.

0xC000000D

STATUS_INVALID_PARAMETER

One of the supplied arguments is invalid.

0xC0000034

STATUS_OBJECT_NAME_NOT_FOUND

The trusted domain object with the specified name could not be found.

0xC0000008

STATUS_INVALID_HANDLE

PolicyHandle is not a valid handle.

Processing:

This message is identical in its operation to LsarSetInformationTrustedDomain; the only exception is that the TrustedDomainName parameter is used to locate the trusted domain object, rather than having the caller supply the trusted domain object handle.

The trusted domain object is located by matching the TrustedDomainName parameter against the trusted domain object in the server's policy database. The trailing period on DNS names is ignored for the purposes of comparison.