PowerTCP Winsock for ActiveX
from $249.00Available Platforms
Ping ActiveX Control
Use the Ping control to easily send and receive ICMP echo (Ping) messages. Dynamically discovers if a host is reachable. Features include:
- Determine if any host is online and reachable.
- Simple interface makes the Ping control easy-to-use.
- Ping a host using blocking or non-blocking techniques.
- Specify any amount of data to send along with the Ping packet.
- Assign an ID to the Ping packet.
Development Environments
- Visual Studio .NET (.NET Framework)
- Visual Basic (VB)
- Visual C++ (VC++)
- FoxPro
- PowerBuilder
- Delphi
- C++ Builder
- ASP (requires the ASP user to have permission to use raw sockets; see Ping Enterprise for a control that does not have this requirement)
- Office 97/2000
Interface
Public Constructors | |
Ping | Use the Ping Control to determine if a host is reachable. |
Public Properties | |
Data | Optional data that is sent and returned with each ping request. |
Delay | Time between sending the ping request and receiving the response (round-trip time in milliseconds). |
Id | Sets the ping request ID included with the request. |
Timeout | Controls the blocking behavior of methods that can be used in blocking and non-blocking ways. |
Public Methods | |
Abort | Abort any blocking method and release all system resources. |
About | Show the About Box. |
Ping | Determine if a host is reachable. |
Error | Fires when an error condition occurs. |
Response | Fires after the Id, Delay, and Data properties are updated with the contents of a ping response. |
Code Example
How easy is the Ping ActiveX component to use? Check out the following Ping VB example below, which demonstrates getting an IP address for a domain name.
On Error GoTo OnError ' use intrinsic error handling
Dim Count As Integer
Dim Delay As Integer
Ping1.Timeout = 10000 'give it 10 seconds to complete
Delay = 0
' Ping a host 3 times.
For Count = 1 To 3
Ping1.Ping "www.dart.com"
Delay = Delay + Ping1.Delay
Next Count
' take the average time
Delay = Delay / Count
MsgBox "Server is reachable, average delay " & Delay & " ms"
Exit Sub
OnError: ' Any error jumps here
Debug.Print "ERROR #" + CStr(Err.Number) + ": " + Err.Description