Group: IP Helper - Library: iphlpapi
The GetRTTAndHopCount function determines the round-trip time (RTT) and hop count to the specified destination.
How to ping a remote site using IP Helper API calls
BOOL GetRTTAndHopCount(
IPAddr DestIpAddress,
PULONG HopCount,
ULONG MaxHops,
PULONG RTT
); DECLARE INTEGER GetRTTAndHopCount IN Iphlpapi;
INTEGER DestIpAddress,;
LONG @ HopCount,;
INTEGER MaxHops,;
LONG @ RTT
DestIpAddress [in] IP address of the destination for which to determine the RTT and hop count.
HopCount [out] This variable receives the hop count to the destination specified by the DestIpAddress parameter.
MaxHops [in] Maximum number of hops to search for the destination.
RTT [out] Round-trip time, in milliseconds, to the destination specified by DestIpAddress.
If the function succeeds, the return value is TRUE.
To convert an IP address between dotted decimal notation and IPAddr format, use the inet_addr and inet_ntoa functions.
Home