• 大小: 4.18MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-19
  • 语言: C/C++
  • 标签:

资源简介

这是以前用于电力局远抄系统中的一个通讯报文转发程序,现场大量集中器连接到该程序某端口,该程序再把集中器连接转到远方服务器上的前置机。 该程序运行稳定,代码简练,用C++开发实现,可做参考!

资源截图

代码片段和文件信息

// 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初始化错误“);
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;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      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\Funcbase.obj

     文件       6307  2010-08-18 16:01  DataTransmitApp\Debug\Funcbase.sbr

     文件      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个文件信息

评论

共有 条评论

相关资源