Actually, it's worse than that, he probably should first try in some
group that deals with Internet programming in general, and then he'll
realize that using ping (or some equivalent activity, such as just
trying to download a generally-available big commercial home page
like
http://www.yahoo.com, or better, pinging a list of DNS servers)
is generally about as good as you're gonna be able to do.
Usually, the only way to know if you're connected to the Internet
is just to try to download something from the Internet, and a lot of
purported API functions that promise to tell you your connection
status at the SYSTEM level either don't work very well or at all, and/or,
you guessed it, just try to connect to something on the Internet...
However, you should definitely check them out if available, they
MAY work for your purposes...it depends a lot on exactly what
type of connection they are expecting, and in any case you are
much more likely to be successful if you know PRECISELY the
connection software/hardware that you are looking for ("default"
connection software, dial-up vs. LAN, etc.)...