static void Main() { //! https://docs.microsoft.com/en-us/dotnet/api/system.appdomain.assemblyload?view=netframework-4.8 //AppDomain currentDomain = AppDomain.CurrentDomain; //currentDomain.AssemblyLoad += new AssemblyLoadEventHandler(OnAssemblyLoadEventHandler); //currentDomain.UnhandledException += new UnhandledExceptionEventHandler(OnUnhandledExceptionEventHandler); ExceptionDlg.InitializeExceptionMode(UnhandledExceptionMode.Automatic); ExceptionDlg.ShownWmiKeys.AddRange( new Wmi.WmiKeys[] { Wmi.WmiKeys.Win32_ComputerSystem, Wmi.WmiKeys.Win32_Processor, Wmi.WmiKeys.Win32_PhysicalMemory }); ExceptionDlg.PreloadedWmiKeys.AddRange( new Wmi.WmiKeys[] { Wmi.WmiKeys.Win32_ComputerSystem, Wmi.WmiKeys.Win32_Processor, Wmi.WmiKeys.Win32_PhysicalMemory }); ExceptionDlg.AppInfo.Add("AppVersion", IniFile.AppVersion); ExceptionDlg.AppInfo.Add("AppData", IniFile.AppData); ExceptionDlg.AppInfo.Add("AppDir", IniFile.AppDir); ExceptionDlg.AppInfo.Add("AppDoc", IniFile.AppDoc); ExceptionDlg.AppInfo.Add("AppCommonData", IniFile.AppCommonData); ExceptionDlg.AppInfo.Add("AppExe", IniFile.AppExe); ExceptionDlg.AppInfo.Add("AppIni", IniFile.AppIni); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); //PrintLoadedAssemblies(currentDomain); }