Example #1
0
        public static unsafe string[] GetExportFunctions(IntPtr hModule)
        {
            Process currentProcess = Process.GetCurrentProcess();
            ModuleFunctionCollection moduleFunction = currentProcess.GetModuleFunctions(hModule);

            List <string> functionName = new List <string>(moduleFunction.Count)
            {
                ""
            };

            functionName.AddRange(moduleFunction.Cast <ModuleFunction>().Select(X => X.Name));

            currentProcess.Dispose();

            return(functionName.ToArray());
        }
        public frmModuleMainBase()
        {
            InitializeComponent();
            if (CheckDesingModel.IsDesingMode)
            {
                return;
            }
            ButtonMap          = new Dictionary <Control, Type>();
            FunctionCollection = new ModuleFunctionCollection();

            //获得模块信息
            System.Reflection.Assembly s          = this.GetType().Assembly;
            AssemblyModuleAttribute    ModuleInfo = (AssemblyModuleAttribute)AssemblyModuleAttribute.GetCustomAttribute(s, typeof(AssemblyModuleAttribute));

            ModuleID   = s.GetName().Name;
            ModuleName = ModuleInfo.ModuleName;
            ModuleImg  = ModuleInfo.ModulePNGLarge;
            this.Load += FrmModuleMainBase_Load;
        }
Example #3
0
        public Management()
        {
            //this.AddFunction(typeof(frmMyUser), "账号管理");
            //this.AddFunction(typeof(frmMyRole), "角色管理");
            //this.AddFunction(typeof(frmRibbonStyle), "Ribbon设置");
            //this.AddFunction(typeof(frmSetting), "系统设置");
            //this.AddFunction(typeof(frmCompanyInfo), "公司信息");
            //this.AddFunction(typeof(frmSystemAuthority), "功能注册");

            FunctionCollection = new ModuleFunctionCollection();

            //获得模块信息
            System.Reflection.Assembly s          = this.GetType().Assembly;
            AssemblyModuleAttribute    ModuleInfo = (AssemblyModuleAttribute)AssemblyModuleAttribute.GetCustomAttribute(s, typeof(AssemblyModuleAttribute));

            ModuleID   = s.GetName().Name;
            ModuleName = ModuleInfo.ModuleName;
            ModuleImg  = ModuleInfo.ModulePNGLarge;
        }