This program is also much more flexible than the ICMP.DLL pinger. The pinger part is mostly reusable as-is, although you will probably want to do things like exchanging the output statements for encoded return values. You might want to add timeout functionality to this program, so that it doesn't wait forever for a ping reply. This program is based on a program in the Win32 SDK, though hardly any of the original code remains.
Program works now.
Not much remains of the original code. Pull the sequence number out of the ICMP header. Allocates send and receive buffers. The other two parameters are outputs from the function. It was a dotted quad number, so save result dest .