p>
# pragma package (smart_init)
# pragma resource "*. dfm" * Form1; b, c, i, j, a = 0; StrCounters [7] [30] = {"ID Process",
"Priority Base",
"Thread Count",
"1410
"% Processor Time",
"Virtual Bytes",
"Page File Bytes"};
__fastcall TForm1 :: TForm1 (TComponent * Owner)
: TForm (Owner)
{= new TStringList; = MAX_COMPUTERNAME_LENGTH; -> Cells [0] [0] = "№"; -> Cells [1] [0] = "Ім'я потоків "; -> Cells [5] [0] =" PID батька "; -> Cells [6] [0] =" Загр. процесу "; -> Cells [7] [0] =" Вірт. пам'ять "; -> Cells [8] [0] =" Пам'ять підг. "; (computername, & size); (NULL, NULL, & hQuery);
} __fastcall TForm1 :: Timer1Timer (TObject * Sender)
{
{h; p;. dwSize = sizeof (PROCESSENTRY32); = CreateToolhelp32Snapshot (TH32CS_SNAPPROCESS, 0); (m == 1)
{> Clear (); (j = 1; j RowCount); j + +)
{(i = 2; i <9; i + +)
}
}
} = 1; (Process32First (h, & p))
{
{> Add (p.szExeFile);
} (Process32Next (h, & p));
}> Sort (); (i = 0; i Count; i = j)
{name = procnames-> Strings [i]. SubString (procnames-> Strings [i]. Length () -2,3); (name == AnsiString ("exe" ) | | name == AnsiString ("EXE"))
{(j = i +1; j Count && procnames-> Strings [i] == procnames-> Strings [j]; j + +)
{> Strings [j] = procnames-> Strings [j]. SubString (1, procnames-> Strings [j]. Length () -4);> Strings [j ] = procnames-> Strings [j] + "#" + IntToStr (ji);
}> Strings [i] = procnames-> Strings [i]. SubString (1, procnames-> Strings [i]. Length () -4);
}
{(j = i +1; j Count && procnames-> Strings [i] == procnames-> Strings [j]; j + +)
{> Strings [j] = procnames-> Strings [j] + "#" + IntToStr (ji);
} (procnames-> Strings [i] == "[System Process]")> Strings [i] = "_Total";
}
} * pCounter; (i = 0; i Count; i + +)
{pro = procnames-> Strings [i]; (j = 0; j <7; j + +)
{= new s.c_str (), 0, pCounter); -> Objects [2 + j] [i +1] = (TObject *) pCounter;
}
}
} _STATUS pdhStatus = 0; (hQuery); (i = 0; i Count; i + +)
{(j <7)
{(j == 6)