資源簡介
基于UDP的MFC通訊程序,數據發送 接受 廣播 端口設置 ip設置
代碼片段和文件信息
//?msocudp.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“UDpAsySk.h“
#include?“msocudp.h“
#include?“msocudpDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMsocudpApp
BEGIN_MESSAGE_MAP(CMsocudpApp?CWinApp)
//{{AFX_MSG_MAP(CMsocudpApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CMsocudpApp?construction
CMsocudpApp::CMsocudpApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CMsocudpApp?object
CMsocudpApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CMsocudpApp?initialization
BOOL?CMsocudpApp::InitInstance()
{
if?(!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
//?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
CMsocudpDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-07-26?20:57??56257935MFCUDP\
?????目錄???????????0??2012-08-04?11:17??56257935MFCUDP\MFCUDP\
?????目錄???????????0??2012-07-26?20:58??56257935MFCUDP\MFCUDP\Debug\
?????文件????????6474??2012-07-18?09:33??56257935MFCUDP\MFCUDP\Debug\cl.command.1.tlog
?????文件???????64064??2012-07-18?09:33??56257935MFCUDP\MFCUDP\Debug\CL.read.1.tlog
?????文件????????4302??2012-07-18?09:33??56257935MFCUDP\MFCUDP\Debug\CL.write.1.tlog
?????文件???????????2??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\li
?????文件???????????2??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\li
?????文件????????3784??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\li
?????文件???????10486??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\li
?????文件????????2942??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\li
?????文件???????71168??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\msocudp.exe
?????文件?????????667??2012-07-15?21:18??56257935MFCUDP\MFCUDP\Debug\msocudp.exe.em
?????文件?????????732??2012-07-17?08:54??56257935MFCUDP\MFCUDP\Debug\msocudp.exe.em
?????文件?????????381??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\msocudp.exe.intermediate.manifest
?????文件?????1060376??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\msocudp.ilk
?????文件??????????96??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\msocudp.lastbuildstate
?????文件????????1294??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\msocudp.log
?????文件???????25089??2012-07-17?15:46??56257935MFCUDP\MFCUDP\Debug\msocudp.obj
?????文件????20381696??2012-07-17?08:53??56257935MFCUDP\MFCUDP\Debug\msocudp.pch
?????文件?????3804160??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\msocudp.pdb
?????文件????????3804??2012-07-18?09:33??56257935MFCUDP\MFCUDP\Debug\msocudp.res
?????文件???????44852??2012-07-18?09:33??56257935MFCUDP\MFCUDP\Debug\msocudpDlg.obj
?????文件?????????210??2012-07-15?21:18??56257935MFCUDP\MFCUDP\Debug\msocudp_manifest.rc
?????文件????????1500??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\mt.command.1.tlog
?????文件????????1522??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\mt.read.1.tlog
?????文件?????????466??2012-07-18?09:36??56257935MFCUDP\MFCUDP\Debug\mt.write.1.tlog
?????文件????????2414??2012-07-18?09:33??56257935MFCUDP\MFCUDP\Debug\rc.command.1.tlog
?????文件????????6314??2012-07-18?09:33??56257935MFCUDP\MFCUDP\Debug\rc.read.1.tlog
?????文件????????1202??2012-07-18?09:33??56257935MFCUDP\MFCUDP\Debug\rc.write.1.tlog
?????文件??????556249??2012-07-17?08:54??56257935MFCUDP\MFCUDP\Debug\StdAfx.obj
............此處省略57個文件信息
評論
共有 條評論