public static LsaPolicyHandle Open(LsaAccessPolicy accessPolicy)
        {
            var systemName       = new LsaUnicodeString();
            var objectAttributes = new LsaObjectAttributes
            {
                Length                   = 0,
                RootDirectory            = IntPtr.Zero,
                Attributes               = 0,
                SecurityDescriptor       = IntPtr.Zero,
                SecurityQualityOfService = IntPtr.Zero,
            };

            LsaPolicyHandle handle = null;

            LsaChecked(() => NativeMethods.LsaOpenPolicy(ref systemName, ref objectAttributes, (int)accessPolicy, out handle));
            return(handle);
        }
Exemplo n.º 2
0
 internal static extern LsaStatus LsaLookupNames2(LsaPolicyHandle policyHandle, LsaLookupNamesFlags flags, uint count, LsaUnicodeString[] names, out LsaReferencedDomainsHandle referencedReferencedDomains, out LsaTranslatedSidHandle translatedSid);
Exemplo n.º 3
0
 public static extern LsaStatus LsaOpenPolicy(ref LsaUnicodeString systemName, ref LsaObjectAttributes objectAttributes, int desiredAccess, out LsaPolicyHandle policyHandle);
Exemplo n.º 4
0
 public static extern LsaStatus LsaAddAccountRights(LsaPolicyHandle policyHandle, IntPtr accountSid, LsaUnicodeString[] userRights, uint countOfRights);
 internal static extern LsaStatus LsaLookupNames2(LsaPolicyHandle policyHandle, LsaLookupNamesFlags flags, uint count, LsaUnicodeString[] names, out LsaReferencedDomainsHandle referencedReferencedDomains, out LsaTranslatedSidHandle translatedSid);
 public static extern LsaStatus LsaAddAccountRights(LsaPolicyHandle policyHandle, IntPtr accountSid, LsaUnicodeString[] userRights, uint countOfRights);
 public static extern LsaStatus LsaOpenPolicy(ref LsaUnicodeString systemName, ref LsaObjectAttributes objectAttributes, int desiredAccess, out LsaPolicyHandle policyHandle);