#include "stdafx.h"
#include "CSMA030390.h"
#include "cmath"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[]=_FILE_;
#endif
CWinThread *thread1,*thread2;
DWORD ID1,ID2,Bus=0;
UINT aThread(LPVOID pParam);
UINT bThread(LPVOID pParam);
using namespace std;
int _tmain(int argc,TCHAR* argv[],TCHAR* envp[])
{
int nRetCode=0;
if (!AfxWinInit(::GetModuleHandle(NULL),NULL,::GetCommandLine(),0))
{
cerr<<_T("Fatal Eorro:MFC initializationfailed")<<endl;
nReCode=1;
}
else
{
thread1=AfxBeginThread(aThread,NULL);
ID1=thread1->m_nThreadID;
thread2=AfxBeginThread(bThread,NULL);
ID2=thread2->m_nThreadID;
getchar();
}
return nRetCode;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载