Solved

Connect to internet??

Posted on 2001-06-22
5
124 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now