Fixing init result issue.
1 //------------------------------------------------------------------------------
3 //------------------------------------------------------------------------------
4 Thread::Thread() : m_hThread(NULL), m_dwThreadId(0)
7 //------------------------------------------------------------------------------
10 if (m_hThread != NULL)
12 TerminateThread(m_hThread, -1);
16 //------------------------------------------------------------------------------
19 if (m_hThread != NULL)
21 m_hThread = CreateThread(
29 //------------------------------------------------------------------------------
30 void Thread::Join() const
32 WaitForSingleObject(m_hThread, INFINITE);
34 //------------------------------------------------------------------------------
35 DWORD WINAPI Thread::ThreadProc(LPVOID lpParam)
37 Thread* pThread = (Thread*)lpParam;
41 //------------------------------------------------------------------------------