Solved

Hanging up Modem

Posted on 2001-07-21
2
147 Views
Last Modified: 2012-05-04
Hello,
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?

thanks
0
Comment
Question by:St3v13
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 6304928
hi,
you can get the latest Ras headers converted to delphi from:
ftp://delphi-jedi.org/api/RAS.zip

install then can do:

uses ras;

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

Regards Barry
0
 

Author Comment

by:St3v13
ID: 6305004
thanks barry! its work great!

Regards Stephen
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

16 Experts available now in Live!

Get 1:1 Help Now