IPHlpAPI
所属分类:Pascal/Delphi编程
开发工具:Delphi
文件大小:62KB
下载次数:82
上传日期:2008-04-14 14:06:51
上 传 者:
1679430
说明: IPHlpAPI delphi源码
(IPHlpAPI delphi source)
文件列表:
Demos (0, 2001-07-28)
Demos\Arp.cfg (386, 2001-04-29)
Demos\Arp.dof (1639, 2001-04-29)
Demos\Arp.dpr (17226, 2001-04-29)
Demos\IpTest.zip (15986, 2001-01-09)
Demos\NetStat.cfg (434, 2001-07-28)
Demos\NetStat.dof (1560, 2001-07-28)
Demos\NetStat.dpr (28870, 2001-07-28)
Demos\Route.cfg (386, 2001-04-29)
Demos\Route.dof (1097, 2001-04-29)
Demos\Route.dpr (20041, 2001-04-29)
Info.txt (1333, 2001-07-28)
Pas (0, 2001-07-28)
Pas\IpExport.pas (13817, 2001-07-28)
Pas\IpHlpApi.pas (32846, 2001-06-25)
Pas\IpIfConst.pas (23041, 2001-07-28)
Pas\IpRtrMib.pas (36031, 2001-07-28)
Pas\IpTypes.pas (8358, 2001-07-28)
This package contains interface units for the Microsoft Windows IP Helper API.
You'll find these units in the Pas folder:
IpExport.pas
IpHlpApi.pas
IpIfConst.pas
IpRtrMib.pas
IpTypes.pas
Three demo projects have been provided which are located in the Demos folder:
Arp.dpr Clone of the Windows arp.exe utility
NetStats.dpr Clone of the Windows netstat.exe utility
Route.dpr Clone of the Windows route utility
All these are meant to demonstrate using the IP Helper API and as such are not
identical to their Windows counterparts and may not be bugfree. For production
systems you should resort to the Microsoft provided utilities.
One addition project is included:
IpTest.zip Demo/Test project which demo's all functions
To compile these projects you must ensure that the interface units can be found
by Delphi. You can do this placing them somewhere on your search path (for example
in your $(DELPHI)\Lib directory. Please note that these projects work only with
Delphi 4 or higher.
This package is the combined work of
John C. Penman (jcp@craiglockhart.com)
Marcel van Brakel (brakelm@chello.nl)
Vladimir Vassiliev (voldemarv@hotpop.com)
For additional information about the IP Helper API please refer to the Platform
SDK documentation and John's two part article series in the Delphi Informant
Magazine (starting March 2001).
[Known Issues]
The Microsoft Platform SDK documentation states that the SetIpForwardEntry can
be used to modify an existing route entry. This appears not to be the case.
Testing shows that this function always adds a new entry regardless of whether
the entry already existed. The route.dpr demo program show a possible workaround,
namely deleting the entry explicitly first.
The macros in IpRtrMib are not converted to functions mainly because although some
could be converted doing so would be dangerous and practically useless (they use
C constructs not available in Object Pascal).
[Conditionals]
The IpHlpApi.pas unit supports dynamic linking through two conditional defines:
IPHLPAPI_DYNLINK
If defined the unit uses dynamic linking, otherwise it uses static linking.
If defined the function IpHlpApiInitAPI must be called before using any of
the functions defined in this unit. This call is automatic unless IPHLPAPI_LINKONREQUEST is also defined. The API is automatically unloaded. If
IPHLPAPI_LINKONREQUEST is defined, this conditional is automatically defined
as well.
IPHLPAPI_LINKONREQUEST
If defined the unit does not automatically call IpHlpApiInitApi in the
initialisation section of the unit instead you must call it yourself explicitly
before using any of the functions in this unit. Unloading is still automatic.
[Functions]
The following functions are included in IpHlpApi to support dynamic loading:
function IpHlpApiInitAPI: Boolean;
Loads the IP Helper API and imports all functions. If IPHLPAPI_DYNLINK is
defined this function must be called before any of the others in this unit.
If the function is successfull it returns True, otherwise it returns False.
procedure IpHlpApiFreeAPI;
Unloads the IP Helper API. After calling this function you can no longer use
any of the functions defined in this unit. This function is automatically
called from the units finalization section.
function IpHlpApiCheckAPI: Boolean;
Call this function to determine whether or not the IP Helper API was initialized.
近期下载者:
相关文件:
收藏者: