Solved

Connect to internet??

Posted on 2001-06-22
5
125 Views
Last Modified: 2010-04-06
Hi.
I just want to know how i can connect to the internet, without showing the dialup dialog. I have password, username and all the other stuff.
I know it has something with RAS to do.
Please show me how to do it.

Dennis
0
Comment
Question by:Dennis9
5 Comments
 
LVL 3

Expert Comment

by:f15iaf
ID: 6220582
0
 
LVL 6

Expert Comment

by:edey
ID: 6220605
Another means is to simply try pinging a few fast, reliable host (www.hotmail.com, www.yahoo.com, etc.).  If at least one of them don't time out you're connected.  I mention this because, and i could be wrong, I don't think that RAS provides any means of checking for connections that aren't dial up based.

GL
Mike
0
 
LVL 14

Accepted Solution

by:
AvonWyss earned 10 total points
ID: 6221108
Try this:

function Online(var Modem, LAN, Proxy: Boolean): Boolean; //Testet: Internet connection vorhanden
var
    flags: Cardinal;
begin
    Result:=InternetGetConnectedState(@flags,0);
    Modem:=flags and INTERNET_CONNECTION_MODEM>0;
    LAN:=flags and INTERNET_CONNECTION_LAN>0;
    Proxy:=flags and INTERNET_CONNECTION_PROXY>0;
end;

It will return TRUE when the computer is connected to the internet, and will always report what the connection methos is (Modem, LAN, Proxy).
0
 
LVL 1

Author Comment

by:Dennis9
ID: 6304064
Hi all.
Well as q says, i do not want to know how to chack an internet connection, i want to connect to the internet.
But anyway AvonWyss had the most usefull internet connection checker so i accept his comment;-)

Dennis
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 6307663
Dennis, thanks for accepting my comment. Note that, since an internet connection may be over a LAN (NAT or PROXY) or different DUN interfaces, the best way is to have the system dial the connection whenever it is needed. The function I provided will allow you to know whether the connection is already established ot not.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, DigitalPersona Fingerprint reader and MySQL 6 275
TVirtualStringTree  search using TEdit 7 122
Printing problem 2 97
Firemonkey DbLookupComboBox equivalent ? 2 49
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question