// See https://aka.ms/new-console-template for more information
using QYDongDongTool;
using QYDongDongTool.Unitls;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
public class Program
{
public static void Main()
{
var list = GetAllDongdongUser();
Console.WriteLine(string.Join(",",list));
//var list = new CSharpAPIs().GetAllDesktopWindows();
//var windows = list.Where(c => c.szClassName == "DD_JM_Workbench_DLG").ToList();
//windows.ForEach(info =>
//{
// foreach (ProcessModule module in Process.GetProcessById(info.ProcessId).Modules)
// {
// //检测是否已经注入
// if (module.ModuleName.Contains("sendPhone.dll"))
// {
// return;
// }
// }
// //注入dll
// MP.Hook((int)info.ProcessId);
//});
}
///
/// 获取全部登录咚咚账号
///
///
public static List GetAllDongdongUser()
{
List dongdongList = new List();
var list = new CSharpAPIs().GetAllDesktopWindows();
var windows = list.Where(c => c.szClassName == "DD_JM_Workbench_DLG").ToList();
windows.ForEach(info =>
{
dongdongList.Add(info.szWindowName.Replace("的工作台", ""));
});
return dongdongList;
}
}