| View previous topic :: View next topic |
| Author |
Message |
Xanatos I post too much
Reputation: 18
Joined: 06 May 2007 Posts: 2559 Location: US
|
Posted: Tue Aug 14, 2007 3:04 pm Post subject: How do you? {delphi} |
|
|
I heard there was a statement that can close certain processes, so if anybody can share this with me, that'd be great .
_________________
|
|
| Back to top |
|
 |
XTrinityX Expert Cheater
Reputation: 0
Joined: 18 May 2006 Posts: 123 Location: Connecticut
|
Posted: Tue Aug 14, 2007 3:14 pm Post subject: |
|
|
You need to get the PID somehow (there are many API, pick one that suits your needs). Then pass the PID to this procedure to terminate the process.
| Code: | procedure TerminateProcessByPID(PID: Cardinal);
var
HndProcess : THandle;
begin
HndProcess := OpenProcess(PROCESS_TERMINATE,TRUE,PID);
TerminateProcess(HndProcess,0);
end; |
|
|
| Back to top |
|
 |
Xanatos I post too much
Reputation: 18
Joined: 06 May 2007 Posts: 2559 Location: US
|
Posted: Tue Aug 14, 2007 3:26 pm Post subject: |
|
|
Thanks, I should be able to handle it from here.
(If not be prepared to get a loot of messages =P).
_________________
|
|
| Back to top |
|
 |
|