Yet another help question: Detecting an internet connection

I would like to be able to detect if the system is connected to the
internet without actually tripping the dial up networking program.

Does anybody know how to do this?  Perhaps detect if wsock32.dll is
loaded?