Solved

Disconnecting from Internet

Posted on 1998-09-02
5
185 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 100 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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