lease could you tell me how to check for an internet connection in C.
:I'm using Windows 2000.
How do you want to define "an internet connection" ?
If I'm using a system connected up to a multi-continent dedicated
research network with ten thousand or so members, does that qualify
as an "internet connection" ?
If I'm using a system that is nailed down and firewalled so tightly
that the -only- thing that can go out on the network is NTP time
synchronization with *one* system, then is that "an internet connection" ?
C itself has no concept of internet connections, so you will have
to use an external facility to do the work.
If you want your definition of "internet connection" to be "there is
some kind of network card, wired or wireless, ethernet or token ring or
even direct IBM SNA, and that NIC is showing that a carrier signal
exists to the card" then you are going to have to use something that is
pretty Windows specific, as there is no portable way to find out what
hardware is attached or details of its state. In such a case, you would
need to use the Windows 32 ABI, probably.
If you want your definition of "internet connection" to be "is able
to send through the network and make a TCP connection to a particular
endpoint" then you can possibly use POSIX standard sockets to just
*try* the connection and see what happens. [Though I seem to recall
reading the Windows 2000 is only fractionally POSIX, with the POSIX
integration being more advanced in XP.]