dowiththread.cpp

来自「PDA通讯网关服务器源码程序」· C++ 代码 · 共 66 行

CPP
66
字号
// DoWithThread.cpp : implementation file
//

#include "stdafx.h"
#include "GateAgent.h"
#include "DoWithThread.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


extern g_nMax;
/////////////////////////////////////////////////////////////////////////////
// CDoWithThread

IMPLEMENT_DYNCREATE(CDoWithThread, CWinThread)

CDoWithThread::CDoWithThread()
{
	
}

CDoWithThread::~CDoWithThread()
{
	if (g_nMax>0)
	{
		g_nMax=g_nMax-1;
		CString strTmp;
		strTmp.Format("处理接收消息的线程退出,目前线程总数目%d",g_nMax);
		m_pDlg->OnInsertMess(strTmp.GetBuffer(0),true,false);		
	}
}

BOOL CDoWithThread::InitInstance()
{
	// TODO:  perform and per-thread initialization here
	return TRUE;
}

int CDoWithThread::ExitInstance()
{
	// TODO:  perform any per-thread cleanup here
	return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(CDoWithThread, CWinThread)
	//{{AFX_MSG_MAP(CDoWithThread)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDoWithThread message handlers

int CDoWithThread::Run() 
{
	//处理消息

	m_pDlg->OnDoWith(0,m_TPA,m_TP_SCTS,m_TP_UD,0);
//	m_pDlg->OnDoWith(0,"8613755088557","05122317231212","001*a1,2,3,002*a2,3,4#",0)
	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?