-
大小: 4.18MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-09-19
- 語言: C/C++
- 標(biāo)簽:
資源簡介
這是以前用于電力局遠(yuǎn)抄系統(tǒng)中的一個(gè)通訊報(bào)文轉(zhuǎn)發(fā)程序,現(xiàn)場大量集中器連接到該程序某端口,該程序再把集中器連接轉(zhuǎn)到遠(yuǎn)方服務(wù)器上的前置機(jī)。
該程序運(yùn)行穩(wěn)定,代碼簡練,用C++開發(fā)實(shí)現(xiàn),可做參考!

代碼片段和文件信息
//?DataTransmitApp.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“DataTransmitApp.h“
#include?“DataTransmitAppDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CDataTransmitAppApp
BEGIN_MESSAGE_MAP(CDataTransmitAppApp?CWinApp)
//{{AFX_MSG_MAP(CDataTransmitAppApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CDataTransmitAppApp?construction
CDataTransmitAppApp::CDataTransmitAppApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CDataTransmitAppApp?object
CDataTransmitAppApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CDataTransmitAppApp?initialization
BOOL?CDataTransmitAppApp::InitInstance()
{
AfxEnableControlContainer();
if?(!AfxSocketInit())
{
AfxMessageBox(“Socket初始化錯(cuò)誤“);
return?FALSE;
}
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CDataTransmitAppDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????22304??2008-08-20?09:43??DataTransmitApp\DataTransmitApp.aps
?????文件???????2145??2010-11-28?20:51??DataTransmitApp\DataTransmitApp.clw
?????文件???????2276??2006-09-28?23:12??DataTransmitApp\DataTransmitApp.cpp
?????文件???????4777??2006-09-30?13:16??DataTransmitApp\DataTransmitApp.dsp
?????文件????????553??2006-09-28?14:19??DataTransmitApp\DataTransmitApp.dsw
?????文件???????1423??2006-09-28?14:19??DataTransmitApp\DataTransmitApp.h
?????文件???12979200??2012-01-30?09:19??DataTransmitApp\DataTransmitApp.ncb
?????文件?????225280??2010-11-28?23:24??DataTransmitApp\DataTransmitApp.opt
?????文件????????264??2010-08-18?20:57??DataTransmitApp\DataTransmitApp.plg
?????文件???????6853??2006-10-12?10:27??DataTransmitApp\DataTransmitApp.rc
?????文件????????895??2012-01-30?09:19??DataTransmitApp\DataTransmitApp.sln
????..A..H.??????7680??2012-01-30?09:19??DataTransmitApp\DataTransmitApp.suo
?????文件???????8929??2012-01-30?09:19??DataTransmitApp\DataTransmitApp.vcproj
?????文件???????1413??2012-01-30?09:19??DataTransmitApp\DataTransmitApp.vcproj.JINGFENG.Administrator.user
?????文件??????11545??2008-10-17?14:29??DataTransmitApp\DataTransmitAppDlg.cpp
?????文件???????2034??2008-08-29?14:07??DataTransmitApp\DataTransmitAppDlg.h
?????文件?????151613??2010-08-18?17:53??DataTransmitApp\Debug\DataTransmitApp.exe
?????文件?????391112??2010-08-18?17:53??DataTransmitApp\Debug\DataTransmitApp.ilk
?????文件??????16179??2010-07-16?20:35??DataTransmitApp\Debug\DataTransmitApp.obj
?????文件???????3372??2008-08-20?09:43??DataTransmitApp\Debug\DataTransmitApp.res
?????文件??????13228??2010-07-16?20:35??DataTransmitApp\Debug\DataTransmitApp.sbr
?????文件??????42674??2010-07-16?20:35??DataTransmitApp\Debug\DataTransmitAppDlg.obj
?????文件??????17498??2010-07-16?20:35??DataTransmitApp\Debug\DataTransmitAppDlg.sbr
?????文件??????21372??2010-08-18?16:01??DataTransmitApp\Debug\Funcba
?????文件???????6307??2010-08-18?16:01??DataTransmitApp\Debug\Funcba
?????文件??????47669??2010-07-16?20:35??DataTransmitApp\Debug\SocketApi.obj
?????文件??????12141??2010-07-16?20:35??DataTransmitApp\Debug\SocketApi.sbr
?????文件?????144914??2010-07-16?20:35??DataTransmitApp\Debug\StdAfx.obj
?????文件????1412798??2010-07-16?20:35??DataTransmitApp\Debug\StdAfx.sbr
?????文件??????62160??2010-07-16?20:35??DataTransmitApp\Debug\SystemTray.obj
............此處省略23個(gè)文件信息
評(píng)論
共有 條評(píng)論