LsaSetTrustedDomainInfoByName function (ntsecapi.h)
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
[in] PolicyHandle
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.
[in] TrustedDomainName
Name of the trusted domain to set values for. This can either be the domain name or the flat name.
[in] InformationClass
Specifies the type of information to set. Specify one of the following values.
[in] Buffer
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
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntsecapi.h |
Library | Advapi32.lib |
DLL | Advapi32.dll |