Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Jorrel Detaunan
  Where is Jorrel Detaunan?
 Las Piñas
 Philippines
 Jorrel Detaunan
 Tags
Subject: Alternative Way to PING IP
Thread ID: 204805 Message ID: 204805 # Views: 47 # Ratings: 0
Version: Visual FoxPro 9 Category: Win32API programming
Date: Monday, November 24, 2008 2:53:45 AM         
   


Hi there!

can i ask for other alternative way to ping IP?
im currently using this:

Lparameters iHost
Declare Integer GetRTTAndHopCount In Iphlpapi;
	Integer DestIpAddress, Long @HopCount,;
	Integer MaxHops, Long @RTT
Declare Integer inet_addr In ws2_32 String cp

Local nDst, nHop, nRTT
nDst = inet_addr(iHost)
Store 0 To nHop, nRTT

If GetRTTAndHopCount(nDst, @nHop, 50, @nRTT) <> 0
	Return .T.

Else
	Return .F.
Endif


this is to check if the servr is up and running.
don't know why but sometimes it returns .F. even the server is up.
but when i try to proceed with my connection string, it connects w/o any errors.

your help is very much appreciated.


Regards,
Jorrel.



COMPLETE THREAD
Alternative Way to PING IP Posted by Jorrel Detaunan @ 11/24/2008 2:53:45 AM
RE: Alternative Way to PING IP Posted by Stefan Wuebbe @ 11/24/2008 7:04:29 AM