terminate process

delphi package - easy access to kernel objects etc.
Post Reply
stOrM!
Posts: 51
Joined: Thu Jul 15, 2004 7:38 pm

terminate process

Post by stOrM! »

Hmm something seems to went wrong now...
I started programming something similiar to the taskmanager, you can press a button to kill a process but with this I have a problem...

some picture to give you an idea about it:

http://www.partydeyiz.de/1.jpg
http://www.partydeyiz.de/2.jpg
http://www.partydeyiz.de/3.jpg
http://www.partydeyiz.de/4.jpg

kill process button:

Code: Select all

{ pid2kill = global var type cardinal }

Process(Pid2Kill).Terminate;

{ I get the pid while someone clicked on an entry in the grid...
the grid then writes the pid into the global var pid2kill... }
when the button was clicked the grid gets updates and refilled without the terminated process of course }


The problem because of this is, when you start notepad and lets say wordpad too...
You can kill wordpad without any problem, while you have to click serveral times the button for killing another process maybe someone knows why...what ????

regards
s!
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Hmmmm... I can only guess that there's something wrong with the PID. I'd suggest logging the PID you're trying to terminate and double checking it with the PID which the windows task manager shows (you can tell the windows task manager to show the process PIDs).
Dr.CheckPoint
Posts: 10
Joined: Thu Dec 08, 2005 10:38 pm

Post by Dr.CheckPoint »

hey dostum sorun nedir?
Ben Türküm :wink: .
Bildiğim kadarıyla yardımcı olmak isterim...
Post Reply