ping_Alexei
所属分类:网络编程
开发工具:Visual C++
文件大小:57KB
下载次数:8
上传日期:2004-09-25 10:39:47
上 传 者:
mawt
说明: 有关Ping使用的例子
(the Ping examples of usage)
文件列表:
Ping.cpp (5310, 2000-01-12)
Ping.h (1947, 2000-01-12)
Ping.rgs (595, 2000-01-12)
pingclient (0, 2000-01-12)
pingclient\hlp (0, 2000-01-12)
pingclient\hlp\PING.HLP (18716, 2000-01-12)
pingclient\hlp\Ping.hpj (263, 2000-01-12)
pingclient\hlp\Ping.rtf (24017, 2000-01-12)
pingclient\Pingclient.cpp (2538, 2000-01-12)
pingclient\Pingclient.dep (784, 2000-01-12)
pingclient\Pingclient.dsp (4607, 2000-01-12)
pingclient\Pingclient.dsw (543, 2000-01-12)
pingclient\Pingclient.h (1338, 2000-01-12)
pingclient\Pingclient.mak (8198, 2000-01-12)
pingclient\Pingclient.rc (5970, 2000-01-12)
pingclient\PingDlg.cpp (8429, 2000-01-12)
pingclient\PingDlg.h (1644, 2000-01-12)
pingclient\PingEvents.cpp (789, 2000-01-12)
pingclient\PingEvents.h (813, 2000-01-12)
pingclient\res (0, 2000-01-12)
pingclient\resource.h (1056, 2000-01-12)
pingclient\res\Pingclient.ico (1078, 2000-01-12)
pingclient\res\Pingclient.rc2 (402, 2000-01-12)
pingclient\StdAfx.cpp (210, 2000-01-12)
pingclient\StdAfx.h (1098, 2000-01-12)
Pingcomp.cpp (1953, 2000-01-12)
Pingcomp.def (224, 2000-01-12)
Pingcomp.dep (551, 2000-01-12)
Pingcomp.dsp (12614, 2000-01-12)
Pingcomp.dsw (539, 2000-01-12)
Pingcomp.h (20972, 2000-01-12)
Pingcomp.idl (2363, 2000-01-12)
Pingcomp.mak (24967, 2000-01-12)
Pingcomp.rc (2852, 2000-01-12)
Pingcomp.tlb (3228, 2000-01-12)
PingcompCP.h (2287, 2000-01-12)
Pingcomp_i.c (1229, 2000-01-12)
Pingcomp_p.c (27479, 2000-01-12)
PingImpl.cpp (9525, 2000-01-12)
... ...
Ping Component and Client
Copyright (C) 1999, Alexei Veremenko, alexv@websci.ru
System requirements (in square brackets data of my system):
Windows NT 4.0 [Workstation, Build 1381: Service Pack 4]
Windows Sockets 1.1 Network Support [wsock32.dll, ws2_32.dll]
Microsoft Visual C++ 6.0, ATL 3.0 [ole32.dll, oleaut32.dll], MFC 4.2 [mfc42.dll]
1. Install, configure.
Unzip pingcomp.zip retaining directory structure to any location
with approx 40Mb of free space. You'll get a folder ./pingcomp
2. Build.
Ping component:
Open workspace ./pingcomp/pingcomp.dsw, select say 'Release MinSize'
configuration (faster build), run build. If building a debug configuration,
browse info will be available.
Ensure that component is registered properly, as indicated by output window:
"Performing registration
RegSvr32: DllRegisterServer in .\ReleaseMinSize\Pingcomp.dll succeeded."
If not try it manually: 'regsvr32 .\ReleaseMinSize\Pingcomp.dll'
Ping client:
Open workspace ./pingcomp/pingclient/pingclient.dsw, select 'Release'
configuration (faster build), run build. If building a debug configuration,
browse info will be available.
3. Run.
After a component and client are built, you're ready to run the program,
but **you should login as administrator** to get valuable results, because
of programs use of raw sockets, which can be opened only with admin privileges -
that's an operation system limitation.
Program's Design:
Ping component (Pingcomp.dll) encapsulates ping implementation and exhibits
corresponding COM interface - IPing.
IPing interface is implemented by CPing class which stores ping parameters, runs
and stops worker thread PingSession(), and fires events through IPingEvents
interface.
CPingImpl class provides low level ping functionality, i.e. creates socket,
form packets, sends, receives and decodes responses.
CProxyIPingEvents class implements IPingEvents interface, it's generated
by classwizard.
Ping client (Pingclient.exe) provides user interface and interaction with
the component.
CPingDlg class - initializes COM library, creates an instance of Ping component,
advises connection for sinking events.
CPingEvents class - a bridge for transmitting events fired by component to dialog.
近期下载者:
相关文件:
收藏者: