Solved

Hanging up modem after 30 minutes (TSR?)

Posted on 1997-09-13
2
179 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 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