DO declare
LOCAL nDst, nHop, nRTT
nDst = inet_addr("212.58.244.67") && bbc news
STORE 0 TO nHop, nRTT
IF GetRTTAndHopCount(nDst, @nHop, 50, @nRTT) <> 0
? "Hop count to the destination:", nHop
? "Round-trip time, in milliseconds:", nRTT
ELSE
* on error, GetLastError may still return zero
? "Error"
ENDIF
* end of main
PROCEDURE declare
DECLARE INTEGER GetRTTAndHopCount IN Iphlpapi;
INTEGER DestIpAddress, LONG @HopCount,;
INTEGER MaxHops, LONG @RTT
DECLARE INTEGER inet_addr IN ws2_32 STRING cp
|