示例#1
0
        public static void EditSecurity(IntPtr hwnd, NtObject handle, string object_name, string typeName, bool writeable)
        {
            NtType typeInfo = NtType.GetTypeByName(typeName);
            Dictionary <uint, String> access = GetMaskDictionary(TypeNameToEnum(typeName));

            using (SecurityInformationImpl impl = new SecurityInformationImpl(object_name, handle, access,
                                                                              typeInfo.GenericMapping))
            {
                EditSecurity(hwnd, impl);
            }
        }
        public static void EditSecurity(IntPtr hwnd, NtObject handle, string object_name, string typeName, bool writeable)
        {
            NtType typeInfo = NtType.GetTypeByName(typeName);
            Dictionary<uint, String> access = GetMaskDictionary(TypeNameToEnum(typeName));

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