Scalabium Software

SMExport advertising

Knowledge for your independence.
Home Delphi and C++Builder tips



#4:How can I get a list of processes which was ran on a system?

Using next procedure you can display the text with any angle.

Today I answered on question with same subject by e-mail to Marcus Monaghan and I sure, that this example will useful for someone else.

procedure TForm1.Button1Click(Sender: TObject);
var handler: THandle;
    data: TProcessEntry32;

  function GetName: string;
  var i:byte;
  begin
     Result := '';
     i := 0;
     while data.szExeFile[i] <> '' do
     begin
        Result := Result + data.szExeFile[i];
        Inc(i);
     end;
   end;

begin
  handler := CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0);
  if Process32First(handler, data) then
  begin
    listbox1.Items.Add(GetName());
    while Process32Next(handler, data) do
       listbox1.Items.Add(GetName());
   end
   else
      ShowMessage('Error');
end;

See also
 
SMExport suite
SMImport suite
SMReport
SMDBGrid
MAPIMail
Paradox Viewer
Paradox ActiveX
ExcelFile Viewer
Metafile Convert
DBLoad
DBExport tools
 
 
Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyrightc 1998-2008, Scalabium Software. All rights reserved.
webmaster@scalabium.com

August 2, 1999

SMExport advertising