diff --git a/BBWY.Client/Helpers/DongDongHelper.cs b/BBWY.Client/Helpers/DongDongHelper.cs index 7a65968a..8eae80f9 100644 --- a/BBWY.Client/Helpers/DongDongHelper.cs +++ b/BBWY.Client/Helpers/DongDongHelper.cs @@ -23,20 +23,33 @@ namespace BBWY.Client.Helpers private void InJectionTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { - InJection(); + InJection(); } private void InJection() { try { - ProcessStartInfo p = new ProcessStartInfo(); - //p.UseShellExecute = true; - p.CreateNoWindow = true; - p.FileName= Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "InJectionDongDong", "dllin.exe"); - p.Arguments = "[jdwb_cef_subprocess]"; - p.Verb = "runas"; - Process.Start(p); + var jdweb_cef_subprocessList = Process.GetProcessesByName("jdwb_cef_subprocess"); + if (jdweb_cef_subprocessList.Length > 0) + { + foreach (var jdweb_cef_subprocess in jdweb_cef_subprocessList) + { + ProcessStartInfo pi = new ProcessStartInfo(); + //p.UseShellExecute = true; + pi.CreateNoWindow = true; + pi.FileName = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "InJectionDongDong", "dllin(3).exe"); + pi.Arguments = $"[{jdweb_cef_subprocess.Id}]"; + pi.Verb = "runas"; + pi.RedirectStandardOutput = true; + var p = Process.Start(pi); + string output = p.StandardOutput.ReadToEnd(); + p.WaitForExit(); + Console.WriteLine($"jdweb_cef_subprocess {jdweb_cef_subprocess.Id} output: {output}"); + } + } + + } catch (Exception ex) { @@ -63,11 +76,12 @@ namespace BBWY.Client.Helpers List dongdongList = new List(); var list = csapi.GetAllDesktopWindows(); - var windows = list.Where(c => c.szClassName == "DD_JM_Workbench_DLG").ToList(); + var windows = list.Where(c => c.szClassName == "Qt5QWindowIcon").ToList(); //DD_JM_Workbench_DLG windows.ForEach(info => { - dongdongList.Add(info.szWindowName.Replace("的工作台", "")); + dongdongList.Add(info.szWindowName.Replace("的工作台", string.Empty) + .Replace("-咚咚融合工作台", string.Empty)); }); return dongdongList; diff --git a/InDll2/dllin(3).exe b/InDll2/dllin(3).exe new file mode 100644 index 00000000..b179c58a Binary files /dev/null and b/InDll2/dllin(3).exe differ