資源簡介
用VC6寫的局域網活動主機掃描程序,基于IPhlp的SENDARP函數,采用256個線程,掃描速度很快,可以獲取活動主機的主機名(有些主機不能獲取主機名)、IP地址和MAC地址。

代碼片段和文件信息
//?HostScan.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“HostScan.h“
#include?“HostScanDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CHostScanApp
BEGIN_MESSAGE_MAP(CHostScanApp?CWinApp)
//{{AFX_MSG_MAP(CHostScanApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CHostScanApp?construction
CHostScanApp::CHostScanApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CHostScanApp?object
CHostScanApp?theApp;
//CString?strLocalIP;
/////////////////////////////////////////////////////////////////////////////
//?CHostScanApp?initialization
BOOL?CHostScanApp::InitInstance()
{
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
CHostScanDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????35848??2010-12-01?17:25??HostScan\HostScan.aps
?????文件???????1301??2010-12-01?17:08??HostScan\HostScan.clw
?????文件???????2114??2010-12-01?16:54??HostScan\HostScan.cpp
?????文件???????4096??2010-12-01?16:54??HostScan\HostScan.dsp
?????文件????????539??2010-12-01?16:54??HostScan\HostScan.dsw
?????文件???????1376??2010-12-01?16:54??HostScan\HostScan.h
?????文件?????541696??2010-12-01?17:34??HostScan\HostScan.ncb
?????文件??????49664??2010-12-01?17:34??HostScan\HostScan.opt
?????文件???????1143??2010-12-01?17:32??HostScan\HostScan.plg
?????文件???????5714??2010-12-01?17:25??HostScan\HostScan.rc
?????文件??????12017??2010-12-01?17:32??HostScan\HostScanDlg.cpp
?????文件???????2127??2010-12-01?17:10??HostScan\HostScanDlg.h
?????文件???????9512??2010-12-01?16:54??HostScan\IPEXPORT.H
?????文件??????15896??2010-12-01?16:54??HostScan\Iphlpapi.h
?????文件??????84498??2003-11-17?20:39??HostScan\Iphlpapi.lib
?????文件??????24462??2010-12-01?16:54??HostScan\IPRTRMIB.H
?????文件???????6814??2010-12-01?16:54??HostScan\IPTYPES.H
?????文件??????90619??2008-04-14?20:00??HostScan\msado15.tlh
?????文件??????76614??2008-04-14?20:00??HostScan\msado15.tli
?????文件???????3615??2010-12-01?16:54??HostScan\ReadMe.txt
?????文件?????221184??2010-12-01?17:32??HostScan\Release\HostScan.exe
?????文件???????6077??2010-12-01?17:00??HostScan\Release\ScanResult.txt
?????文件???????1078??2009-06-15?16:35??HostScan\res\HostScan.ico
?????文件????????400??2010-12-01?16:54??HostScan\res\HostScan.rc2
?????文件????????916??2010-12-01?17:25??HostScan\resource.h
?????文件??????38926??2010-12-01?17:34??HostScan\Scan.jpg
?????文件???????5063??2010-12-01?17:33??HostScan\ScanResult.txt
?????文件????????212??2010-12-01?16:57??HostScan\StdAfx.cpp
?????文件???????1216??2010-12-01?16:54??HostScan\StdAfx.h
?????目錄??????????0??2010-12-01?17:35??HostScan\Release
............此處省略5個文件信息
評論
共有 條評論