Solved

Hanging up modem after 30 minutes (TSR?)

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

17 Experts available now in Live!

Get 1:1 Help Now