The IcmpSendEcho function sends an IPv4 ICMP echo request and returns any echo response replies. The call returns when the time-out has expired or the reply buffer is filled.
DWORD IcmpSendEcho(
__in HANDLE IcmpHandle, //icmp句柄
__in IPAddr DestinationAddress, //IPAddr结构的ip地址表达
__in LPVOID RequestData, //请求的数据指针
__in WORD RequestSize, //数据长度
__in PIP_OPTION_INFORMATION RequestOptions, //一部分请求选项,包括TTL TOS等
__inout LPVOID ReplyBuffer, //返回信息缓冲区,这里指向的是一个ICMP_ECHO_REPLY结构
__in DWORD ReplySize, //返回信息的长度
__in DWORD Timeout //超时的最大值
);