Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Working with a modem

Posted on 1998-11-01
2
Medium Priority
?
287 Views
Last Modified: 2008-02-01
Hello,
 How can i know on witch COM port is installed the modem with VB4?

Best regard's
0
Comment
Question by:VB041898
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
CraigLazar earned 150 total points
ID: 1442774
Hi
try the following dll's one of them should be able to return a value telling you which com port is being used for the modem
Declare Function GetCommModemStatus Lib "kernel32" Alias "GetCommModemStatus" (ByVal hFile As Long, lpModemStat As Long) As Long
Declare Function GetCommProperties Lib "kernel32" Alias "GetCommProperties" (ByVal hFile As Long, lpCommProp As COMMPROP) As Long
Declare Function GetCommState Lib "kernel32" Alias "GetCommState" (ByVal nCid As Long, lpDCB As DCB) As Long



 hope it helps
cheers craig
0
 

Author Comment

by:VB041898
ID: 1442775
Thank you for your answer, and excuse me for my late reply.
I beleive you are right, but i don't know what value i have to provide to the function.
I don't know what is "hFile", "lpModemStat", " lpCommProp", "nCid ", ect... I don't know what they mean, and how i can know their value.
Could you explicite me this?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

715 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