Solved

Connect to internet??

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

724 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