The question doesn't really have a meaning. There is no such thing as a 'connection to the Internet'. You have to try to create one. The Windows API referred to only tells you whether your modem is dialled in or not, and I've seen it actually cause dial-ins, which is not exactly the idea. Not that I've had a dial-in for the last 8 years or so.