API for pinging ?

Dear Friends,
I just want to detect the presence of a computer identified by its IP address on the LAN. I found several APIs which seems to have a link with Winsock ,about which I know nothing right at the moment. So can you suggest the easiest method to do that. A code snippet will be more helpful. Thanks , You were always helpful to me.

Susiriss.
[393 byte] By [susiriss] at [2007-11-18 23:21:11]
# 1 Re: API for pinging ?
[ Moved thread ]
Andreas Masur at 2007-11-9 13:47:30 >
# 2 Re: API for pinging ?
The easiest way is to use

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/icmpsendecho.asp
Mick at 2007-11-9 13:48:41 >
# 3 Re: API for pinging ?
Or see the sample code ( http://tangentsoft.net/wskfaq/examples/dllping.html).
Boris K K at 2007-11-9 13:49:39 >
# 4 Re: API for pinging ?
Thanks Boris,
Your sample code was really helpful and I was able to connect my own interface, and it just works. Thanks again for your help.

Susiriss
susiriss at 2007-11-9 13:50:34 >