示例#1
0
//启动线程处理函数
unsigned int CThread::Run(LPVOID	lpParam)
{
	CThread *pThread = reinterpret_cast<CThread*>(lpParam);
	if(pThread)
	{
		try{
			::InterlockedExchange(&pThread->m_bRun,1);
			pThread->ThreadProc();
		}
		catch(std::exception e)
		{
			
		}
		pThread->ClearThreadRes();
	}
	return (0);
}