Exemplo n.º 1
0
        internal static NtStatus LsaRetrievePrivateData(SafeLsaPolicyHandle policyHandle, string keyName, out byte[] privateData)
        {
            var      unicodeKeyName = new UnicodeString(keyName);
            IntPtr   privateDataPointer;
            NtStatus result = LsaRetrievePrivateData(policyHandle, ref unicodeKeyName, out privateDataPointer);

            try
            {
                privateData = privateDataPointer != IntPtr.Zero ? Marshal.PtrToStructure <LsaBuffer>(privateDataPointer).GetBytes() : null;
            }
            finally
            {
                LsaFreeMemory(privateDataPointer);
            }
            return(result);
        }
Exemplo n.º 2
0
 internal static NtStatus LsaSetInformationPolicy(SafeLsaPolicyHandle policyHandle, LsaDnsDomainInformationNative buffer)
 {
     return(LsaSetInformationPolicy(policyHandle, LsaPolicyInformationClass.DnsDomainInformation, ref buffer));
 }
Exemplo n.º 3
0
 private static extern NtStatus LsaSetInformationPolicy(SafeLsaPolicyHandle policyHandle, LsaPolicyInformationClass informationClass, [In] ref LsaDnsDomainInformationNative buffer);
Exemplo n.º 4
0
 private static extern NtStatus LsaSetInformationPolicy(SafeLsaPolicyHandle policyHandle, LsaPolicyInformationClass informationClass, IntPtr buffer);
Exemplo n.º 5
0
 internal static extern NtStatus LsaQueryInformationPolicy(SafeLsaPolicyHandle policyHandle, LsaPolicyInformationClass informationClass, out IntPtr buffer);
Exemplo n.º 6
0
 private static extern NtStatus LsaRetrievePrivateData(SafeLsaPolicyHandle policyHandle, [In] ref UnicodeString keyName, out IntPtr privateData);
Exemplo n.º 7
0
        internal static NtStatus LsaOpenPolicy(string systemName, LsaPolicyAccessMask desiredAccess, out SafeLsaPolicyHandle policyHandle)
        {
            var unicodeName = new UnicodeString(systemName);
            var attributes  = new LsaObjectAttributes();

            return(LsaOpenPolicy(ref unicodeName, ref attributes, desiredAccess, out policyHandle));
        }
Exemplo n.º 8
0
 private static extern NtStatus LsaOpenPolicy([In] ref UnicodeString systemName, [In] ref LsaObjectAttributes objectAttributes, LsaPolicyAccessMask desiredAccess, out SafeLsaPolicyHandle policyHandle);