Hanging up Modem

Posted on 2001-07-21
Medium Priority
Last Modified: 2012-05-04
I have coded a small program which will hang up the modem after a certain number of minutes, but theres one problem, i dont know how to hang up the modem! Its a dial up connection if you need to know.

Any help?

Question by:St3v13
LVL 17

Accepted Solution

inthe earned 200 total points
ID: 6304928
you can get the latest Ras headers converted to delphi from:

install then can do:

uses ras;

procedure TForm1.Button1Click(Sender: TObject);
  RasConn  : TRasConn;
  bsize    : DWORD;
  Count    :  DWORD;
  RasConn.dwSize := SizeOf(TRasConn);
  bsize := SizeOf(RASConn);
  if RASEnumConnections(@RASConn, bsize, Count) = 0 then
     if Count > 0 then RASHangUp(RASConn.hRasConn);

Regards Barry

Author Comment

ID: 6305004
thanks barry! its work great!

Regards Stephen

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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…
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…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…

587 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