how would i kill the program that is running, without an error?
Subzero
Printable View
how would i kill the program that is running, without an error?
Subzero
Get the main window handle of that program and post it a WM_Close event. That should make it shutdown gracefully, if it is written well.
RK
If you REALLY need this program to close, you should do a couple of steps. Get a handle to the application and send the WM_CLOSE message. At this point, you could give the program a small amount of time to terminate and, if it's still running, use the TerminateThread API. If you have an understanding of C, check out the TLIST example on MSDN.