1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
BOOL CALLBACK appList3(HWND hwnd, LPARAM user) {
int a = (int)user;
wxString s1; wxString s2; wxString s3;
s1.Printf(wxT("%i"), a);
s2.Printf(wxT("exe"));
s3.Printf(wxT("title"));
WCHAR t1; LPTSTR t2 = NULL;
LPDWORD pid = NULL;
GetWindowThreadProcessId(hwnd, pid);
s1.Printf(wxT("%i"), pid);
s2 = getAppExe(pid); a++;
int i1 = GetWindowTextLength(hwnd); //(hwnd, &t1, 50);
int i2 = 0;
if (i1 == 0) { i2 = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0); }
if (i1 > 0) {
GetWindowText(hwnd, &t1, i1);
s3.Printf(wxT("%s"), t1);
} else if (i2 > 0) {
SendMessage(hwnd, WM_GETTEXTLENGTH, i2, (LPARAM)t2);
s3.Printf(wxT("%s"), t2);
}
/*hexWin->gApp->AppendRows(1);
hexWin->gApp->SetCellValue(appLen, 0, s1);
hexWin->gApp->SetCellValue(appLen, 1, s2);
//s.Printf(wxT("%i"), pe32.th32ProcessID);
hexWin->gApp->SetRowLabelValue(appLen, s);*/
//useCB = FALSE;
frame->appLen = a;
frame->addApp(s1, s2, s3);
return TRUE;
}
| |