Click here to Skip to main content
15,904,934 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Visual C++.NET and VS C++ 6.0, are they the same? Pin
Michael Dunn31-May-06 21:12
sitebuilderMichael Dunn31-May-06 21:12 
AnswerRe: Visual C++.NET and VS C++ 6.0, are they the same? Pin
toxcct31-May-06 23:04
toxcct31-May-06 23:04 
AnswerRe: Visual C++.NET and VS C++ 6.0, are they the same? Pin
William.Wang31-May-06 23:09
William.Wang31-May-06 23:09 
QuestionHow end/stop/destroy a thread Pin
zahid_ash31-May-06 20:56
zahid_ash31-May-06 20:56 
AnswerRe: How end/stop/destroy a thread Pin
Stephen Hewitt31-May-06 21:11
Stephen Hewitt31-May-06 21:11 
Generalwould this stop release the memory occupied by a thread Pin
zahid_ash31-May-06 21:17
zahid_ash31-May-06 21:17 
AnswerRe: How end/stop/destroy a thread Pin
Cedric Moonen31-May-06 21:11
Cedric Moonen31-May-06 21:11 
AnswerRe: How end/stop/destroy a thread [modified] Pin
_AnsHUMAN_ 31-May-06 22:01
_AnsHUMAN_ 31-May-06 22:01 
A thread can be terminated in four ways:
1)The thread function returns. (This is highly recommended.)

2)The thread kills itself by calling the ExitThread function. (Avoid this method.)

3)A thread in the same or in another process calls the TerminateThread function. (Avoid this method.)

4)The process containing the thread terminates. (Avoid this method.)

Option 1 ensures that all thread resources are cleaned up properly. Any and all C++ objects created in your thread function will be destroyed properly via their destructors.
The operating system will properly free the memory used by the thread's stack.
The system will set the thread's exit code (maintained in the thread's kernel object) to your thread function's return value.
The system will decrement the usage count of the thread's kernel object.

Somethings seem HARD to do, until we know how to do them.
Wink | ;-)
_AnShUmAn_
AnswerRe: How end/stop/destroy a thread Pin
David Crow1-Jun-06 4:07
David Crow1-Jun-06 4:07 
QuestionCString to char* conversion Pin
NiceNaidu31-May-06 20:34
NiceNaidu31-May-06 20:34 
AnswerRe: CString to char* conversion [modified] Pin
_AnsHUMAN_ 31-May-06 20:43
_AnsHUMAN_ 31-May-06 20:43 
GeneralRe: CString to char* conversion Pin
Sarath C31-May-06 20:46
Sarath C31-May-06 20:46 
GeneralRe: CString to char* conversion [modified] Pin
Stephen Hewitt31-May-06 20:49
Stephen Hewitt31-May-06 20:49 
AnswerRe: CString to char* conversion Pin
Sarath C31-May-06 20:45
Sarath C31-May-06 20:45 
GeneralRe: CString to char* conversion Pin
NiceNaidu31-May-06 20:53
NiceNaidu31-May-06 20:53 
GeneralRe: CString to char* conversion Pin
Sarath C31-May-06 22:32
Sarath C31-May-06 22:32 
AnswerRe: CString to char* conversion Pin
Steve Echols31-May-06 20:47
Steve Echols31-May-06 20:47 
AnswerRe: CString to char* conversion Pin
toxcct31-May-06 22:57
toxcct31-May-06 22:57 
GeneralRe: CString to char* conversion Pin
NiceNaidu31-May-06 23:11
NiceNaidu31-May-06 23:11 
GeneralRe: CString to char* conversion Pin
toxcct31-May-06 23:13
toxcct31-May-06 23:13 
GeneralRe: CString to char* conversion Pin
Nibu babu thomas31-May-06 23:14
Nibu babu thomas31-May-06 23:14 
GeneralRe: CString to char* conversion Pin
David Crow1-Jun-06 4:09
David Crow1-Jun-06 4:09 
AnswerRe: CString to char* conversion Pin
William.Wang31-May-06 23:22
William.Wang31-May-06 23:22 
QuestionHow to use c++ header file in .c file Pin
saravana pandy31-May-06 20:33
saravana pandy31-May-06 20:33 
AnswerRe: How to use c++ header file in .c file Pin
NiceNaidu31-May-06 20:37
NiceNaidu31-May-06 20:37 

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.