class CSpiderThread : public CWinThread
{
public:
CSpiderThread(AFX_THREADPROC pfnThreadProc,ThreadParams *pThreadParams);
virtual ~CSpiderThread();
static UINT ThreadFunc(LPVOID lparam);
BOOL ThreadRun(ThreadParams *pThreadParams);
BOOL m_bDone;
void KillThread();
}
这样当
CSpiderThread* pThread;
pThread = NULL;
pThread = new CSpiderThread(CSpiderThread::ThreadFunc,pThreadParams); // create a new CSpiderThread object
就构建一个线程