Click here to Skip to main content
15,894,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A Shading algorithm ? Pin
Stephane Rodriguez.21-Aug-02 7:27
Stephane Rodriguez.21-Aug-02 7:27 
GeneralRe: A Shading algorithm ? Pin
yarp21-Aug-02 21:54
yarp21-Aug-02 21:54 
GeneralChris Maudre Datagrid Pin
Mazdak21-Aug-02 5:35
Mazdak21-Aug-02 5:35 
GeneralRe: Chris Maudre Datagrid Pin
Chris Losinger21-Aug-02 5:36
professionalChris Losinger21-Aug-02 5:36 
GeneralRe: Chris Maudre Datagrid Pin
Mazdak21-Aug-02 7:29
Mazdak21-Aug-02 7:29 
Generalterminate a worker thread Pin
lucy21-Aug-02 5:31
lucy21-Aug-02 5:31 
GeneralRe: terminate a worker thread Pin
Tomasz Sowinski21-Aug-02 5:38
Tomasz Sowinski21-Aug-02 5:38 
GeneralRe: terminate a worker thread Pin
lucy21-Aug-02 6:01
lucy21-Aug-02 6:01 
I add the following modifications:
OnCreate()
{
   m_hMyThread = AfxBeginThread(...);
}


OnClose()
{
   m_bThreadRun = FALSE;
   WaitForSingleObject(m_hMyThread, 1000);
}


but WaitForSingleObject will fail and the reason is "The handle is invalid. ". why? Confused | :confused: Confused | :confused:

FYI, I have added the volatile specifier to my worker thread checking.
GeneralRe: terminate a worker thread Pin
RChin21-Aug-02 23:43
RChin21-Aug-02 23:43 
GeneralRe: terminate a worker thread Pin
lucy22-Aug-02 2:41
lucy22-Aug-02 2:41 
GeneralRe: terminate a worker thread Pin
Chris Losinger21-Aug-02 5:41
professionalChris Losinger21-Aug-02 5:41 
GeneralRe: terminate a worker thread Pin
lucy21-Aug-02 6:08
lucy21-Aug-02 6:08 
GeneralRe: terminate a worker thread Pin
Chris Losinger21-Aug-02 6:16
professionalChris Losinger21-Aug-02 6:16 
GeneralRe: terminate a worker thread Pin
lucy21-Aug-02 7:17
lucy21-Aug-02 7:17 
Generalquick question about recordsets, ADO Pin
ns21-Aug-02 4:54
ns21-Aug-02 4:54 
GeneralRe: quick question about recordsets, ADO Pin
Ravi Bhavnani21-Aug-02 5:24
professionalRavi Bhavnani21-Aug-02 5:24 
GeneralRe: quick question about recordsets, ADO Pin
Ravi Bhavnani21-Aug-02 5:25
professionalRavi Bhavnani21-Aug-02 5:25 
GeneralRe: quick question about recordsets, ADO Pin
Blade[DMS]21-Aug-02 5:28
Blade[DMS]21-Aug-02 5:28 
GeneralI tried this, but Pin
ns21-Aug-02 5:36
ns21-Aug-02 5:36 
GeneralRe: I tried this, but Pin
Ravi Bhavnani21-Aug-02 5:39
professionalRavi Bhavnani21-Aug-02 5:39 
GeneralRe: I tried this, but Pin
ns21-Aug-02 5:46
ns21-Aug-02 5:46 
GeneralRe: I tried this, but Pin
Ravi Bhavnani21-Aug-02 5:51
professionalRavi Bhavnani21-Aug-02 5:51 
GeneralRe: I tried this, but Pin
Blade[DMS]21-Aug-02 5:49
Blade[DMS]21-Aug-02 5:49 
Generalthanks everyone. I used recordcount instead Pin
ns21-Aug-02 6:11
ns21-Aug-02 6:11 
GeneralRe: thanks everyone. I used recordcount instead Pin
Rashid Thadha21-Aug-02 6:21
Rashid Thadha21-Aug-02 6:21 

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.