![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jul 2004
Posts: 8
Rep Power: 0
![]() |
Hi
I start a console process like dir with ShellExecute function. Is there any way to stop this process from my program the time I want ? ( it might be in the middle of execution of the dir command or in the end of execution of dir command ) Thanks |
|
|
|
|
|
#2 |
|
Expert Programmer
|
Type this on the command line (presuming you have Linux)
man 2 kill That will give you all the details you need to know. If you are using windows killing a process I think is a bit more involved...
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#3 |
|
Newbie
|
Hey there,
I advise you explore the option of instead using the ShellExecuteEx function for such a purpose, which will allow you to gain access to the process handle of the console process you spawn. Naturally, with that process handle, you will be able to call TerminateProcess(HANDLE, UINT) at your own discretion. Best of luck to you with your endeavour. References: http://msdn.microsoft.com/library/en-us/sh....asp?frame=true http://msdn.microsoft.com/library/en-us/dl....asp?frame=true |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|