Link to home
Start Free TrialLog in
Avatar of vsulu
vsulu

asked on

How To Kill a Thread completely

I have used two worker threads in my project which perform two different operations , i want to terminate the thread completely in the middle of the operation ,how do i use Afxendthread to kill it.
   please explain me with an example, what does that parameter exitcode refer to.

I have for loops running in my thread which does lengthy operation
 say when i press a button kill the thread has to be killed.
i am using worker thread.

even when i am using return statement inside the thread it does no get killed.
 basically i am calling a member function inside the thread function,and in the thread function i have mentioned  if th == NULL return false, wher th is pointing to the dialog.

ASKER CERTIFIED SOLUTION
Avatar of ambience
ambience
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by : ambience, makerp (points to be split)

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer