Beispiel #1
0
        public static void EditSecurity(IntPtr hwnd, string name, SecurityDescriptor sd, NtType type)
        {
            Dictionary <uint, String> access = GetMaskDictionary(type);

            using (var impl = new SecurityInformationImpl(name, sd, access, type.GenericMapping))
            {
                EditSecurity(hwnd, impl);
            }
        }
Beispiel #2
0
        public static void EditSecurity(IntPtr hwnd, NtObject handle, string object_name, bool read_only)
        {
            Dictionary <uint, String> access = GetMaskDictionary(handle.NtType);

            using (SecurityInformationImpl impl = new SecurityInformationImpl(object_name, handle, access,
                                                                              handle.NtType.GenericMapping, read_only))
            {
                EditSecurity(hwnd, impl);
            }
        }