-
Jul 21st, 2005, 03:29 PM
#1
Thread Starter
Supreme User
[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;
-
Jul 21st, 2005, 03:39 PM
#2
Lively Member
Re: [DELPHI] - Get running processes?
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??
-
Apr 29th, 2007, 10:29 AM
#3
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|