?
Solved

Disconnecting from Internet

Posted on 1998-09-02
5
Medium Priority
?
188 Views
Last Modified: 2010-04-04
Hi guys,

does anyone of you know how to disconnect from internet, when the connection is done via automatic-dial-up networking?

Here what I want to do, in more detail:

I am writing an automated FTP client using a freeware FTP component. The client shall connect to internet (via dial-up), then upload something, then disconnect.

Connecting works fine, because windows connects automatically, when I do the ftp.connect command. But how can I disconnect, after the upload is finished?
Althogh windows disconnects automatically after say 10 minutes, this is not satisfying.

I already know that I need some WinApi functions (e.g. RasEnumConnections and RasDisconnect or something like that), but how to do it in Delphi 3.0??

Are there componetns?

Regards
  Mirko
0
Comment
Question by:Mirko
[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 7

Expert Comment

by:BlackMan
ID: 1338468
Check RunDUN at http://www.geocities.com/CapeCanaveral/9646/, it might be able to do what you want..
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1338469
mirko

Yes you do need to use the windows API RasEnumConnections to get a handle of the connection, then you call the RasHangUp API call once you have the handle for the connection...

RasHangUp(RasHandle);

where Rashandle is the handle obtained from RasEnumConnections...

Check the win32 helpfile for the details of RasEnumConnections.

Later
BoRiS
0
 
LVL 4

Expert Comment

by:itamar
ID: 1338470
Hi Mirko,

there is a great RAS example in FPiette´s site. Full control over dial-up connections.
Take a look at:

http://www.rtfm.be/fpiette/rasdialuk.htm

I can accept some points if you find this link usefull ;-)))

bye,
Itamar
0
 

Author Comment

by:Mirko
ID: 1338471
Sorry Boris, your "Answer" was just typing what I already knew!!

Hi Itamar,
pose your comment as "Answer", I will accept it so that you will receive your credits.
0
 
LVL 4

Accepted Solution

by:
itamar earned 400 total points
ID: 1338472
Hi Mirko,

     there is a great RAS example in FPiette´s site. Full control over dial-up
     connections.
     Take a look at:

     http://www.rtfm.be/fpiette/rasdialuk.htm

     bye,
     Itamar
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 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