www.pudn.com > gps-time.rar > ProcDataThrd.cpp


// ProcDatdThrd.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "RegionComm.h" 
#include "ProcDataThrd.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CProcDataThrd 
 
IMPLEMENT_DYNCREATE(CProcDataThrd, CWinThread) 
 
CProcDataThrd::CProcDataThrd() 
{ 
} 
 
CProcDataThrd::~CProcDataThrd() 
{ 
} 
 
BOOL CProcDataThrd::InitInstance() 
{ 
	// TODO:  perform and per-thread initialization here 
	return TRUE; 
} 
 
int CProcDataThrd::ExitInstance() 
{ 
	// TODO:  perform any per-thread cleanup here 
	return CWinThread::ExitInstance(); 
} 
 
BEGIN_MESSAGE_MAP(CProcDataThrd, CWinThread) 
	//{{AFX_MSG_MAP(CProcDataThrd) 
		// NOTE - the ClassWizard will add and remove mapping macros here. 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CProcDataThrd message handlers 
 
int CProcDataThrd::Run()  
{ 
	if(m_pOwner==NULL) 
		return(0); 
    m_pOwner->ProcessCommData() ; 
	return(1); 
} 
void CProcDataThrd::SetOwner(CCommunication* pOwner) 
{ 
	m_pOwner = pOwner; 
}