Results 1 to 3 of 3

Thread: [DELPHI] - Get running processes?

  1. #1

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    [DELPHI] - Get running processes?

    Code:
    procedure TForm1.Button1Click(Sender: TObject);
    var
    MyHandle: THandle;
    Struct: TProcessEntry32;
    begin
    try
    MyHandle:=CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0);
    Struct.dwSize:=Sizeof(TProcessEntry32);
    if Process32First(MyHandle, Struct) then
    ListBox1.Items.Add(Struct.szExeFile);
    while Process32Next(MyHandle, Struct) do
    ListBox1.Items.Add(Struct.szExeFile);
    except on exception do
    ShowMessage('Error showing process list');
    end
    end;

  2. #2
    Lively Member
    Join Date
    Feb 2005
    Posts
    120

    Re: [DELPHI] - Get running processes?

    Quote Originally Posted by Madboy
    Code:
    procedure TForm1.Button1Click(Sender: TObject);
    var
    MyHandle: THandle;
    Struct: TProcessEntry32;
    begin
    try
    MyHandle:=CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0);
    Struct.dwSize:=Sizeof(TProcessEntry32);
    if Process32First(MyHandle, Struct) then
    ListBox1.Items.Add(Struct.szExeFile);
    while Process32Next(MyHandle, Struct) do
    ListBox1.Items.Add(Struct.szExeFile);
    except on exception do
    ShowMessage('Error showing process list');
    end
    end;
    thx alot for answeing my question
    but i found what i was looking for
    - I have a loooooooooot of Delphi questions..But i don't think that i can post them in the Code Bank..Is there is a Forum in This Forums that i can post delphi questions??

  3. #3
    New Member
    Join Date
    Apr 2007
    Posts
    1

    Re: [DELPHI] - Get running processes?

    how to i get process username ? please help me...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width