三河网站建设-七天网络,用于网站建设的费用怎么备注,最近国际新闻大事20条,柏乡县建设局网站这里使用一个外挂程序测试#xff0c;因为外挂程序没有做功能限制的处理 只是做了 窗口影藏。 全局变量 HWND hwnd[100]{0};int number0;DWORD Tpid0; 局部变量 char username[1028]; 先找到进程ID 1 HWND SelectPor() 2 { 3 bool isYesfalse; 4 string porcessName因为外挂程序没有做功能限制的处理 只是做了 窗口影藏。 全局变量 HWND hwnd[100]{0};int number0;DWORD Tpid0; 局部变量 char username[1028]; 先找到进程ID 1 HWND SelectPor() 2 { 3 bool isYesfalse; 4 string porcessName可可会员正式版3.04.exe;//可可火影世界辅助会员版 5 PROCESSENTRY32 lppe; 6 lppe.dwSizesizeof(lppe); 7 HANDLE hsnapshotCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); 8 if(hsnapshotINVALID_HANDLE_VALUE) 9 {10 printf(调用CreateToolhelp32Snapshot失败\n);11 }12 bool isOKProcess32First(hsnapshot,lppe);13 while(isOK)14 {15 string namelppe.szExeFile;16 int aname.compare(porcessName);17 if(a0)18 {19 printf(这里是SelectPor()进程名%s\n,lppe.szExeFile);20 Tpidlppe.th32ProcessID;21 //HANDLE hanlegetProcessHandle(lppe.th32ParentProcessID);22 23 //HWND txtNameGetWindowByPidc(lppe.th32ParentProcessID);24 25 //printf(%s\n,txtName);26 }27 isOKProcess32Next(hsnapshot,lppe);28 }29 CloseHandle(hsnapshot);30 return NULL;31 } 把指定进程所有窗口句柄存起来 1 void getstring() 2 { 3 if(EnumWindows(EnumWindowsProc,NULL)) 4 { 5 6 } 7 } 8 9 BOOL CALLBACK EnumWindowsProc(HWND hwnd,LPARAM lParam)10 {11 GetWTProcessId(hwnd);12 return true;13 }14 15 void GetWTProcessId(HWND name)16 {17 DWORD dwPid,dwTid;18 GetWindowThreadProcessId(name,dwPid);19 if(TpiddwPid)20 {21 hwnd[number]name;22 }23 } 对要操作的窗口进行操作。 1 if(hwnd!NULL) 2 { 3 for(int i0;inumber-1;i) 4 { 5 GetWindowText(hwnd[i],username,sizeof(username)); 6 if(_T(username)!NULL) 7 { 8 printf(%s\n,_T(username)); 9 string cmpstrusername;10 if(cmpstr.compare(可可登陆界面)0)11 {12 ShowWindow(hwnd[i],SW_HIDE)true?printf(隐藏成功):printf(隐藏失败);13 14 }15 if(cmpstr.compare(可可火影世界辅助会员版)0)16 {17 RECT rec;18 bool isYEsfalse;19 GetWindowRect(hwnd[i],rec);20 21 EnableWindow(hwnd[i],true);22 23 isYEsSetWindowPos(hwnd[i],HWND_TOPMOST,rec.left,rec.top,rec.right-rec.left,rec.bottom-rec.top,SWP_SHOWWINDOW);24 isYEstrue?printf(置顶成功):printf(置顶失败);25 }26 }27 }28 } 转载于:https://www.cnblogs.com/yueyue184/archive/2011/12/12/2285002.html