Solved

Detecting modem installation

Posted on 1998-09-07
3
165 Views
Last Modified: 2010-04-06
Hi,

how can I detect, if the modem is installed?

Thanx.
0
Comment
Question by:Stern
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Edo082297 earned 50 total points
ID: 1338877
Hi Stern
   You want to intercepyt an event issued by Windows, WM_DEVICECHANGE, that will notify your program of a change in the hardware configuration. Look up Application.HookMainWindow, and use HookWndProc to receive this message. You will specifically be looking for the DBT_DEVICEARRIVAL message. If you would like me to code this for you, let me know and I will, but you may have enough information to go on.

Regards,
Edo
0
 
LVL 1

Expert Comment

by:Edo082297
ID: 1338878
Hi Stern
   I don't think I answered your question properly. To detect if a modem is installed on a machine, open each com port using CreateFile and send "AT"<CR>, and listen for an "OK" response. However, any of these ports with CD high should not be disturbed, as it may be in use (probably by the mouse).

HTH
Edo
0
 

Author Comment

by:Stern
ID: 1338879
Sorry, it's not clear for me. Could you, maybe, give some examples?
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

827 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