Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to Kill All Processes but dont exit program

Status
Not open for further replies.

nbgoku

Programmer
May 25, 2004
108
US
how do i kill all processes being run by the program but not exit the program if a button is pressed
 
ok ive looked up some infor on terminateprocess, and found CreateProcess, but the thing is how can i make create process create a function, the thing is

see what my program is doing is writing some info to a file, and while its writing to a file, i want the person to have the ability to STOP the writing after a certian button is selected


plz note: when i tried ExitProcess, my hole program closed
 
ExitProcess only exits the current process. If you want the application ot give to user a possibility to do something before closing the process, you should only warn the user for example with a messagebox. After that wait some time and close the process if it still exists.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top