How do I check if a user is connected to the internet and how do I get the name of the connection if he is?

BTW, I tried the various RAS APIs but they only work with dialups.