Hi
Recently I needed to check if a server is down, and the easiest way to do this is to use the ping command.
If you need to do this from your application, you either have to deal with raw sockets, all their complexities and admin privileges, or you can use the well-known
IcmpSendEcho API.
With the latter, the implementation is fairly straightforward, and as a bonus, the trace command can be coded just as easily.
I had to translate the appropriate header file and the rest was more or less standard coding.
In the attachments I've included as reference a 32-bit test application, the ping and trace code, and the IcmpAPI.inc and IPExport.inc files, that are required to use the IcmpSendEcho API.

Biterider