Click here to Skip to main content
15,890,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: A problem about acceptex Pin
Michael Dunn20-Apr-07 7:17
sitebuilderMichael Dunn20-Apr-07 7:17 
QuestionTerminateThread Question Pin
Programm3r19-Apr-07 21:03
Programm3r19-Apr-07 21:03 
AnswerRe: TerminateThread Question Pin
Cedric Moonen19-Apr-07 21:19
Cedric Moonen19-Apr-07 21:19 
GeneralRe: TerminateThread Question Pin
Programm3r19-Apr-07 21:38
Programm3r19-Apr-07 21:38 
AnswerRe: TerminateThread Question Pin
Hamid_RT19-Apr-07 21:20
Hamid_RT19-Apr-07 21:20 
GeneralRe: TerminateThread Question Pin
Programm3r19-Apr-07 21:49
Programm3r19-Apr-07 21:49 
GeneralRe: TerminateThread Question Pin
Hamid_RT19-Apr-07 21:51
Hamid_RT19-Apr-07 21:51 
AnswerRe: TerminateThread Question Pin
_AnsHUMAN_ 19-Apr-07 21:25
_AnsHUMAN_ 19-Apr-07 21:25 
From MSDN:
You should call TerminateThread only if you know exactly what the target thread is doing, and you control all of the code that the target thread could possibly be running at the time of the termination. For example, TerminateThread can result in the following problems:

:If the target thread owns a critical section, the critical section will not be released.
:If the target thread is allocating memory from the heap, the heap lock will not be released.
:If the target thread is executing certain kernel32 calls when it is terminated, the kernel32 state for the thread's process could be inconsistent.
:If the target thread is manipulating the global state of a shared DLL, the state of the DLL could be destroyed, affecting other users of the DLL.
So you can either wait until all the threads finish execution or return from the thread function when some condition is violated.

Somethings seem HARD to do, until we know how to do them.
Wink | ;-) _AnShUmAn_

GeneralRe: TerminateThread Question Pin
Programm3r19-Apr-07 21:50
Programm3r19-Apr-07 21:50 
GeneralRe: TerminateThread Question Pin
_AnsHUMAN_ 19-Apr-07 22:27
_AnsHUMAN_ 19-Apr-07 22:27 
Questionabout keyboard hook Pin
HOW WHAT19-Apr-07 21:02
HOW WHAT19-Apr-07 21:02 
AnswerRe: about keyboard hook Pin
Hamid_RT19-Apr-07 21:22
Hamid_RT19-Apr-07 21:22 
AnswerRe: about keyboard hook Pin
Rajesh R Subramanian19-Apr-07 23:24
professionalRajesh R Subramanian19-Apr-07 23:24 
Questionhide dos window Pin
prathuraj19-Apr-07 20:20
prathuraj19-Apr-07 20:20 
AnswerRe: hide dos window Pin
Paresh Chitte19-Apr-07 20:47
Paresh Chitte19-Apr-07 20:47 
GeneralRe: hide dos window [modified] Pin
prathuraj19-Apr-07 21:51
prathuraj19-Apr-07 21:51 
AnswerRe: hide dos window Pin
Hamid_RT19-Apr-07 21:11
Hamid_RT19-Apr-07 21:11 
QuestionLPWSTR to CString Pin
arunperi19-Apr-07 20:20
arunperi19-Apr-07 20:20 
AnswerRe: LPWSTR to CString Pin
_AnsHUMAN_ 19-Apr-07 20:29
_AnsHUMAN_ 19-Apr-07 20:29 
GeneralRe: LPWSTR to CString Pin
arunperi19-Apr-07 20:51
arunperi19-Apr-07 20:51 
GeneralRe: LPWSTR to CString Pin
Michael Dunn20-Apr-07 7:19
sitebuilderMichael Dunn20-Apr-07 7:19 
AnswerRe: LPWSTR to CString Pin
Paresh Chitte19-Apr-07 21:05
Paresh Chitte19-Apr-07 21:05 
GeneralRe: LPWSTR to CString Pin
toxcct20-Apr-07 0:36
toxcct20-Apr-07 0:36 
GeneralRe: LPWSTR to CString Pin
Michael Dunn20-Apr-07 7:20
sitebuilderMichael Dunn20-Apr-07 7:20 
GeneralRe: LPWSTR to CString Pin
toxcct20-Apr-07 23:05
toxcct20-Apr-07 23:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.