I use the following code for our LAN: (never tested for modem though)
#define INTERNET_CONNECTION_MODEM 1
#define INTERNET_CONNECTION_LAN 2
#define INTERNET_CONNECTION_PROXY 4
#define INTERNET_CONNECTION_MODEM_BUSY 8
declare InternetGetConnectedState ;
in "wininet.dll" ;
long @ lpdwFlags, ;
long dwReserved
? InternetGetConnectedState(INTERNET_CONNECTION_MODEM, 0)
HTH
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges