diff --git a/MisakaTranslator-WPF/Properties/AssemblyInfo.cs b/MisakaTranslator-WPF/Properties/AssemblyInfo.cs index f33ffb78..13088c2c 100644 --- a/MisakaTranslator-WPF/Properties/AssemblyInfo.cs +++ b/MisakaTranslator-WPF/Properties/AssemblyInfo.cs @@ -12,5 +12,5 @@ [assembly : AssemblyCulture("")] [assembly : ComVisible(false)] [assembly : ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] -[assembly : AssemblyVersion("2.12.0.0")] -[assembly : AssemblyFileVersion("2.12.0.0")] +[assembly : AssemblyVersion("2.12.1.0")] +[assembly : AssemblyFileVersion("2.12.1.0")] diff --git a/TextHookLibrary/ProcessHelper.cs b/TextHookLibrary/ProcessHelper.cs index 16cf50ab..de6e05ef 100644 --- a/TextHookLibrary/ProcessHelper.cs +++ b/TextHookLibrary/ProcessHelper.cs @@ -112,7 +112,8 @@ public static string FindProcessPath(int pid, bool isx64game = false) foreach (var p in Process.GetProcesses()) using (p) try { l.Add((p.Id, p.MainModule.FileName)); } - catch (System.ComponentModel.Win32Exception) { } + catch (System.ComponentModel.Win32Exception) { } // 无权限 + catch (InvalidOperationException) { } // 进程已退出 return l; } } diff --git a/Tools/ProcessHelperExt.cs b/Tools/ProcessHelperExt.cs index 505cbea4..8d84fdc8 100644 --- a/Tools/ProcessHelperExt.cs +++ b/Tools/ProcessHelperExt.cs @@ -11,15 +11,19 @@ if (args.Length == 1) { int pid = int.Parse(args[0]); - Process p; - try { p = Process.GetProcessById(pid); } - catch (System.ArgumentException) { return 3; } // 不存在pid对应的进程 - Console.WriteLine(p.MainModule.FileName); + try + { + Process p = Process.GetProcessById(pid); + Console.WriteLine(p.MainModule.FileName); + } + catch (ArgumentException) { return 3; } // 不存在pid对应的进程 + catch (InvalidOperationException) { return 3; } // 进程已退出 } else foreach (var p in Process.GetProcesses()) try { Console.WriteLine("{0}|{1}", p.Id, p.MainModule.FileName); } catch (System.ComponentModel.Win32Exception) { } // 跳过权限不够的进程 + catch (InvalidOperationException) { } // 进程已退出 return 0; } diff --git a/index.html b/index.html index 9f833438..9755dffe 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,3 @@ This is AutoUpdateCheck's Page. -LatestVersion[2.12.0.0] +LatestVersion[2.12.1.0] DownloadPath[https://github.com/hanmin0822/MisakaTranslator/releases]