Solved

Hanging up modem after 30 minutes (TSR?)

Posted on 1997-09-13
2
177 Views
Last Modified: 2010-04-04
I have dial-up internet connection and
I would like to know how can I hang up my modem
after I have been online 30 minutes (or 120 minutes or
what ever time I choose).

It would hang up modem when duration in Windows 95
dialer is 00:30:00 and redial immediately after that.
And again hang up after 30 minutes and redial (loop :)
So the program would start after I have connected
(like ICQ does).
 
I guess I need some kind of tsr, but how do I do it?
Give me so advice where to start. I can use Delphi 2 or 3.

BTW Sorry bad english

ToniTOP
0
Comment
Question by:tonitop
2 Comments
 

Expert Comment

by:joseramos
ID: 1344763
I'm not sure I understood the question, however it appears as
this could be a perfect case for a TTimer that would check the
time elapsed (or Dialer duration) every 30 minutes or so and take some action (Dial again or hangup the modem).
0
 
LVL 3

Accepted Solution

by:
Pegasus100397 earned 100 total points
ID: 1344764
ToniTop,
You do not need a TSR for this activity but rather a small Delphi program to get the list of running tasks (Dial Up Networking in this case) and it's associated window handle.

Once you've determined the handle of the "Dial Up Networking" application, check it's child windows until you come to the label containing the "On-line" time. It's this label your program will monitor.

Once the label (minutes portion) reaches 30 then issue a WM_Click message to the "Disconnect" button on the form to close the connection. Wait about 10 seconds and issue a WM_Click message to the "Connect" button on the form. This will connect and re-set the on-line timer where you program will wait for the minutes to reach "30" again, thereby repeating the cycle. Hope this helps.

Pegasus
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

20 Experts available now in Live!

Get 1:1 Help Now