473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to tell if Internet access is available?

Is there a way to determine if the local machine has access to the internet?

Cheers, Jon
Nov 16 '05 #1
1 1168

Try this

[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState( out int Description,
int ReservedValue ) ;

Usage -

int Desc ;
bool IsIntenetAvailable = InternetGetConnectedState( out Desc, 0) ;

Desc may give the following values

INTERNET_CONNECTION_CONFIGURED
INTERNET_CONNECTION_LAN
INTERNET_CONNECTION_MODEM
INTERNET_CONNECTION_MODEM_BUSY
INTERNET_CONNECTION_OFFLINE
INTERNET_CONNECTION_PROXY
INTERNET_RAS_INSTALLED
--
Shak
(Houston)


"Jon Pope" <jo******@yahoo.com> wrote in message
news:ue**************@tk2msftngp13.phx.gbl...
Is there a way to determine if the local machine has access to the internet?
Cheers, Jon

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Cliff Wells | last post by:
Hi, I'm writing an application that needs to know if an Internet connection is available. Basically, I want to have something similar to what a lot of email clients have, where the app can work...
17
by: Mike A | last post by:
Hi, I'm hoping someone can help me with this. I have a URL for which I'd like to limit access to by time. For example,say I have a URL that I don't want accessable on Monday mornings between...
4
by: Russell Crosser | last post by:
I maintain an internet site. The host is linux based and uses postgres on the server. I wish to install a smallish database (of names and addresses +) on the host, and allow it to be accessed over...
56
by: Raphi | last post by:
Hi, I've been using an Access application I wrote for an office with the front-end stored on all computers and the back-end on one of them serving as an Access file server. Now we're moving...
8
by: Jozef | last post by:
Hello, Is there a way to test that an internet connection exists and that you are able to see the webserver before performing any connections? The reason being, when I try to connect to an SQL...
19
by: Mark 123 | last post by:
I just read at http://groups.google.com/group/microsoft.public.access.forms/browse_frm/thread/766ba7b493eacb63/8a7d5504ee848c21?lnk=st&q=migrate+access+97+to+access+2007&rnum=1#8a7d5504ee848c21...
40
by: Mark G. Meyers | last post by:
http://www.savetheinternet.com There is more info and A PETITION at moveon... Easy to sign and give your two cents (and to your own reps in the process)....
6
by: LurfysMa | last post by:
I am working on an electronic flashcard application. I have one version up and running using Visual Basic (6.0) and Access 2000. My long-range plans are to put it up on a website and sell...
5
by: Lyle Fairfield | last post by:
From time to time I have posted about the convenience of such hosts. Typically, they make available an MS-Sql Server database on their internet-enabled servers (See note below). I (and my clients)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.