LsaDeleteTrustedDomain function (ntsecapi.h)
The LsaDeleteTrustedDomain function removes a trusted domain from the list of trusted domains for a system and deletes the associated TrustedDomain object.
Syntax
NTSTATUS LsaDeleteTrustedDomain(
[in] LSA_HANDLE PolicyHandle,
[in] PSID TrustedDomainSid
);
Parameters
[in] PolicyHandle
A handle to a Policy object. For more information, see Opening a Policy Object Handle.
[in] TrustedDomainSid
Pointer to the SID of the trusted domain to be removed.
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 LSA Policy Function 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 |