private static string GenerateSystemDllVersionList() { string[] dlls = { "NTDLL.DLL", "KERNELBASE.DLL", "KERNEL32.DLL", "USER32.DLL", "GDI32.DLL" }; var result = new StringBuilder(); foreach (var dll in dlls) { var version = FileVersionInfo.GetVersionInfo( Path.Combine( Path.GetPathRoot(Environment.SystemDirectory), SystemHelper.Is64BitOS() ? @"Windows\SysWOW64\" : @"Windows\System32\", dll)); result.Append(dll); result.Append(": "); result.Append( $"{version.FileMajorPart}.{version.FileMinorPart}.{version.FileBuildPart}.{version.FilePrivatePart}"); result.Append("\r\n"); } return(result.ToString()); }
public static void ShowErrorDebugMessageBox(string commandLine, uint errorCode) { MessageBox.Show(String.Format("Error Number: {0}\r\n" + "Commands: {1}\r\n" + "\r\n" + "{2}\r\n" + "{3}\r\n" + "If you have any antivirus software running, please turn it off and try again.\r\n" + "If this window still shows, try go to Safe Mode and drag the application " + "executable onto LEProc.exe.\r\n" + "If you have tried all above but none of them works, feel free to submit an issue at\r\n" + "https://github.com/xupefei/Locale-Emulator/issues.\r\n" + "\r\n" + "\r\n" + "You can press CTRL+C to copy this message to your clipboard.\r\n", Convert.ToString(errorCode, 16).ToUpper(), commandLine, String.Format("{0} {1}", Environment.OSVersion, SystemHelper.Is64BitOS() ? "x64" : "x86"), GenerateSystemDllVersionList() ), "Locale Emulator Version " + GetLEVersion()); }