PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Checks whether a network address can be reached by using the ICMP protocol (similar to the PING network utility).
Example
IF Ping("www.mysite.com") = True THEN
Info("The server is available. You can see the News")
ELSE
Info("Server temporarily unavailable")
END
Syntax
<Result> = Ping(<Address> [, <Maximum Duration>])
<Result>: Boolean
  • True if the sought address is "visible" on the network,
  • False otherwise.
<Address>: Character string (with quotes)
Address for which the network connection must be checked. This IP address can have the following format:
  • Address in XXX.XXX.XXX.XXX format (125.5.110.100 for example). This syntax is recommended.
  • DNS address of the computer (www.windev.com for instance).
  • Address returned by NetIPAddress
<Maximum Duration>: Optional integer or optional Duration
Maximum duration allowed to find the address (in milliseconds). This parameter can correspond to:
  • an integer corresponding to the number of milliseconds,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s or 10 ms for example).
    New in version 23
    the direct indication of duration (1 s or 10 ms for example).
    the direct indication of duration (1 s or 10 ms for example).
This duration is set to 1000 by default.
Remarks
Ping is mainly a tool for network diagnostic. It does not guarantee that:
  • the computer will respond on a given port (to do so, use SocketConnect).
  • the computer is broken. Indeed, if the ping service is stopped on the computer, this computer will stop responding while it is still operating properly.
Components
WINDEVReports and Queries wd230com.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment