// The thread executes the run function of its handler DWORD WINAPI ActiveObject::ThreadFunc( void* pAO ) { ActiveObject* ActiveObj = static_cast<ActiveObject*>(pAO); ActiveObj->InitThread(); ActiveObj->Run(); return 0; // no one cares what we return in this case }
unsigned int ActiveObject::_Run(LPVOID lpParam) { ActiveObject *pThread = reinterpret_cast<ActiveObject*>(lpParam); if(pThread) { try { pThread->Run( ); } catch(std::exception&) { } pThread->ClearUp( ); } return (0); }