Depends if you own the thread or not....
DosKillThread() will toast any thread that your process created. However, it is not exactly recommended because it does not allow the thread to do any cleanup work before it exits.
I also remember some hazards using DosKillThread to toast threads that were created with beginthread instead of DosCreateThread...
The best way is to set some kind of notification flag for the thread, and let it do its cleanup and then exit.
If you are trying to kill an individual thread from another process, then I don't know how to do it. You might be out of luck....
You also might want to mention *why* you want to kill a thread - there might be a better way of doing it than just destroying the thread...
Main Topics
Browse All Topics





by: elcocoPosted on 1998-04-14 at 14:51:30ID: 1292145
Edited text of question