資源簡介
用c++寫的端口掃描小程序,MFC(exe)

代碼片段和文件信息
//?PortScan.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“PortScan.h“
#include?“PortScanDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CPortScanApp
BEGIN_MESSAGE_MAP(CPortScanApp?CWinApp)
//{{AFX_MSG_MAP(CPortScanApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CPortScanApp?construction
CPortScanApp::CPortScanApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CPortScanApp?object
CPortScanApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CPortScanApp?initialization
BOOL?CPortScanApp::InitInstance()
{
AfxEnableControlContainer();
if?(!AfxSocketInit())
{ AfxMessageBox(“Windows?sockets?初始化失敗“);
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
CPortScanDlg?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??2011-06-16?13:18??PortScan\
?????文件???????36452??2011-05-23?19:35??PortScan\PortScan.aps
?????文件????????1806??2011-05-23?20:03??PortScan\PortScan.clw
?????文件????????2187??2011-05-23?19:56??PortScan\PortScan.cpp
?????文件????????4195??2011-05-23?18:48??PortScan\PortScan.dsp
?????文件?????????539??2011-05-23?20:04??PortScan\PortScan.dsw
?????文件????????1346??2011-05-23?18:48??PortScan\PortScan.h
?????文件???????58368??2011-05-23?20:04??PortScan\PortScan.ncb
?????文件???????53760??2011-05-23?20:04??PortScan\PortScan.opt
?????文件?????????876??2011-05-23?20:02??PortScan\PortScan.plg
?????文件????????6463??2011-05-23?19:35??PortScan\PortScan.rc
?????文件???????12813??2011-05-23?20:02??PortScan\PortScanDlg.cpp
?????文件????????2622??2011-05-23?19:16??PortScan\PortScanDlg.h
?????文件????????3615??2011-05-23?18:48??PortScan\ReadMe.txt
?????文件????????1238??2011-05-23?19:35??PortScan\Resource.h
?????文件?????????210??2011-05-23?18:48??PortScan\StdAfx.cpp
?????文件????????1054??2011-05-23?18:48??PortScan\StdAfx.h
?????目錄???????????0??2011-05-31?23:22??PortScan\res\
?????文件????????1078??2011-05-23?18:48??PortScan\res\PortScan.ico
?????文件?????????400??2011-05-23?18:48??PortScan\res\PortScan.rc2
評論
共有 條評論