Exemplo n.º 1
0
// 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
}
Exemplo n.º 2
0
unsigned int ActiveObject::_Run(LPVOID	lpParam)
{
	ActiveObject *pThread = reinterpret_cast<ActiveObject*>(lpParam);
	if(pThread)
	{
		try
		{
			pThread->Run( );
		}
		catch(std::exception&)
		{
		}
		pThread->ClearUp( );
		
	}
	return (0);
}