Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, anyone can help me.

 CWinThread *pthread;

if (pthread==NULL)
{
m_pThread=AfxBeginThread();
waitforsingleobject(m_hevent,25000);
}


why does it crash on relese mode?
Posted
Updated 30-Aug-11 20:30pm
v3
Comments
Emilio Garavaglia 31-Aug-11 5:34am    
If you want better help, ask better your question: we don't see your screen and don't read your mind:
- Where does CWinThread comes from ?? MFC ?? your own class ?? At least give some hint on the environment and libraries you're using.
- where are m_pThread and m_hevent declared? Are we inside a method of a class? Are they members of such a class? Are they initialized at some point ?

Use the "improve question" link and edit your question to make it more self explaining.

1 solution

Check AfxBeginThread()

And where did you initialize the m_hevent variable? And you're checking NULL for pthread, but assigning the new thread to m_pThread.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900