?
Solved

Hanging up Modem

Posted on 2001-07-21
2
Medium Priority
?
161 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 200 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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Integration Management Part 2
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month16 days, 4 hours left to enroll

850 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