Solved

Detecting modem installation

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

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

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 120
Delphi cmd execution 6 56
Delphi 2 50
Delphi Ado Query To Converts Joined Columns Into Rows Based on Primary Key 4 39
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 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