?
Solved

Connect to internet??

Posted on 2001-06-22
5
Medium Priority
?
132 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 20 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

800 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