From: Shashank Date Date: 2002-08-22T21:55:17+09:00 Subject: Re: thread control Hi Park, > If you use command "ping 10.0.0.0 -n 90 -w 1000 > NUL", > it creates two processes 'cmd.exe' and 'ping.exe'. > I can get pid of 'cmd.exe', but not pid of 'ping.exe'. If you download pstools from: http://www.sysinternals.com/ntw2k/freeware/pstools.shtml and run "pslist -t" it shows you the process tree. (There is also a Win2K ResourceKit utility "ptree" which I believe does the same thing). Which tells me that there is Windows API which exposes the parent-child relationship of processes. May be that is what is needed to finish it off. > If you can find pid of 'ping.exe', there's no problem. > It's your chance to finish this program perfectly. Assuming I get hold of the pid for "ping", I guess, I will have to replace the following line of your modification: hProcess = OpenProcess.Call(0x100001, 1 , f.pid) ^^^^ with: hProcess = OpenProcess.Call(0x100001, 1 , ping_pid) Right ? I will try ... but I am not as comfortable with Windows API as you are ...so I might call for help again ;-) > > Park Heesob. > Thanks a lot, again, Park. -- Shanko