/// <summary>
 /// Enumerate trusted domain information.
 /// </summary>
 /// <param name="throw_on_error">True to throw on error.</param>
 /// <returns>The list of trusted domain information.</returns>
 public NtResult <IReadOnlyList <LsaTrustedDomainInformation> > EnumerateTrustedDomains(bool throw_on_error)
 {
     return(LsaPolicyUtils.LsaEnumerateObjects(Handle, SecurityNativeMethods.LsaEnumerateTrustedDomainsEx,
                                               (TRUSTED_DOMAIN_INFORMATION_EX s) => new LsaTrustedDomainInformation(s), throw_on_error));
 }
 /// <summary>
 /// Enumerate account SIDs in policy.
 /// </summary>
 /// <param name="throw_on_error">True to throw on error.</param>
 /// <returns>The list of account SIDs.</returns>
 public NtResult <IReadOnlyList <Sid> > EnumerateAccounts(bool throw_on_error)
 {
     return(LsaPolicyUtils.LsaEnumerateObjects(Handle, SecurityNativeMethods.LsaEnumerateAccounts,
                                               (LSAPR_ACCOUNT_INFORMATION s) => new Sid(s.Sid), throw_on_error));
 }