Check for internet connection 
Author Message
 Check for internet connection

How can I check for an active internet connection with Win NT/2K?

Thanks

Harry



Tue, 06 Apr 2004 14:29:17 GMT  
 Check for internet connection
Try this tip:

http://www.vbworld.com/internet/tip467.html

Alex


Quote:
> How can I check for an active internet connection with Win NT/2K?

> Thanks

> Harry



Tue, 06 Apr 2004 17:23:51 GMT  
 Check for internet connection
Harry,

Here's a link to some stuff I posted on a different NG about this
topic.

Follow this thread :-)

http://groups.google.com/groups?hl=en&frame=right&th=38bd7c5cc14af9bb...

Hope this helps.

Quote:

> How can I check for an active internet connection with Win NT/2K?

> Thanks

> Harry



Wed, 07 Apr 2004 11:27:47 GMT  
 Check for internet connection


Quote:
>How can I check for an active internet connection with Win NT/2K?

>Thanks

There's a few ways to do this, either directly using
Microsoft's RAS (remote access services) API or a
third-party control. For the API approach, take a
look at http://support.microsoft.com/support/kb/articles/q150/9/48.asp
on the Microsoft Developer's Network site. If you'd prefer to use a
control, we have a free RAS control that's part of the SocketWrench
package which you can download from us at
http://www.catalyst.com/download/wrench.html

To detect if a connection has been established, you'll need to check
for an active dial-up networking connection. With the API, you'd use
RasEnumConnections and RasGetConnectStatus. With our control, you'd
just need to check the Connected property when the control is first
loaded; if it's true, and you haven't taken any action to initiate a
connection, then you know that a pre-existing connection has been
made.

As a side-note, I'd avoid reading registry keys to determine if you
have an active DUN session. Specific registry entries can be different
between Windows 95/98 and Windows NT, and with newer releases of the
operating system the key names or values may change, causing your
program to fail unexpectedly.

David

----

Catalyst Development Corporation   | application with ActivePatch. Download
http://www.catalyst.com/           | the SDK from www.activepatch.com



Thu, 08 Apr 2004 13:02:28 GMT  
 Check for internet connection
True about the last part, using the registry for this information is not
reliable. But if you have to check for an active DUN connection how would it
work for LAN connections? ie cable and dsl?

Alex


Quote:


> >How can I check for an active internet connection with Win NT/2K?

> >Thanks

> There's a few ways to do this, either directly using
> Microsoft's RAS (remote access services) API or a
> third-party control. For the API approach, take a
> look at http://support.microsoft.com/support/kb/articles/q150/9/48.asp
> on the Microsoft Developer's Network site. If you'd prefer to use a
> control, we have a free RAS control that's part of the SocketWrench
> package which you can download from us at
> http://www.catalyst.com/download/wrench.html

> To detect if a connection has been established, you'll need to check
> for an active dial-up networking connection. With the API, you'd use
> RasEnumConnections and RasGetConnectStatus. With our control, you'd
> just need to check the Connected property when the control is first
> loaded; if it's true, and you haven't taken any action to initiate a
> connection, then you know that a pre-existing connection has been
> made.

> As a side-note, I'd avoid reading registry keys to determine if you
> have an active DUN session. Specific registry entries can be different
> between Windows 95/98 and Windows NT, and with newer releases of the
> operating system the key names or values may change, causing your
> program to fail unexpectedly.

> David

> ----

> Catalyst Development Corporation   | application with ActivePatch.
Download
> http://www.catalyst.com/           | the SDK from www.activepatch.com



Fri, 09 Apr 2004 00:45:38 GMT  
 Check for internet connection
Hi Alex,

There's no foolproof way to pre-determine if there's an Internet
connection with xDSL or cablemodem connections, short of simply
attempting to connect to the service in question. There are a few
things that can be tried, such as send ICMP ECHO datagrams (pings) to
the target system, but the problem there is some routers are
configured to filter them and even though a system may respond to
them, it doesn't mean that any given service is actually running.

You'll generally have to do a combination of things. Look to see if
there are any connectoids defined; if there are, then this system may
use a dial-up connection, so check to see if one is there. If there
is, or if there are no connectoids at all, trying pinging a target
site or sending a DNS query to a well-known nameserver and see if you
get a response. If you do, it's probably safe to presume that you have
an active net connection. It should be noted however, that repeatedly
probing remote systems is generally considered anti-social, and if
it's done heavily, the admin might confuse it with an attempted DDoS
attack. Something to keep in mind when writing general purpose
applications.

David

On Sun, 21 Oct 2001 17:45:38 +0100, "Alex"

Quote:

>True about the last part, using the registry for this information is not
>reliable. But if you have to check for an active DUN connection how would it
>work for LAN connections? ie cable and dsl?

>Alex





>> >How can I check for an active internet connection with Win NT/2K?

>> >Thanks

>> There's a few ways to do this, either directly using
>> Microsoft's RAS (remote access services) API or a
>> third-party control. For the API approach, take a
>> look at http://support.microsoft.com/support/kb/articles/q150/9/48.asp
>> on the Microsoft Developer's Network site. If you'd prefer to use a
>> control, we have a free RAS control that's part of the SocketWrench
>> package which you can download from us at
>> http://www.catalyst.com/download/wrench.html

>> To detect if a connection has been established, you'll need to check
>> for an active dial-up networking connection. With the API, you'd use
>> RasEnumConnections and RasGetConnectStatus. With our control, you'd
>> just need to check the Connected property when the control is first
>> loaded; if it's true, and you haven't taken any action to initiate a
>> connection, then you know that a pre-existing connection has been
>> made.

>> As a side-note, I'd avoid reading registry keys to determine if you
>> have an active DUN session. Specific registry entries can be different
>> between Windows 95/98 and Windows NT, and with newer releases of the
>> operating system the key names or values may change, causing your
>> program to fail unexpectedly.

>> David

>> ----

>> Catalyst Development Corporation   | application with ActivePatch.
>Download
>> http://www.catalyst.com/           | the SDK from www.activepatch.com

----

Catalyst Development Corporation   | application with ActivePatch. Download
http://www.catalyst.com/           | the SDK from www.activepatch.com


Mon, 12 Apr 2004 12:26:35 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Advanced: CHECK for Internet Connection

2. Checking an Internet Connection

3. Checking an Internet Connection

4. Checking for Internet connection

5. checking for internet connection in NT

6. How to check for internet connection?

7. Check for internet connection

8. Advanced: CHECK for Internet Connection

9. Checking for Internet Connection

10. Check if internet connection is up.....

11. Check for Internet Connection

12. checking internet connection from .net

 

 
Powered by phpBB® Forum Software