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;


Published: August 2, 1999

See also
 
ABA Document Convert
Excel Reader (dll)
ExcelFile Viewer
ABA Database Convert
DBLoad
Viewer for MS Outlook Messages
Metafile Convert
Protected Storage Viewer
dBase Viewer
SMMsg suite
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2017, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport advertising