Solved

Detecting modem installation

Posted on 1998-09-07
3
159 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
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…

708 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

18 Experts available now in Live!

Get 1:1 Help Now