Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Working with a modem

Posted on 1998-11-01
2
Medium Priority
?
290 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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

963 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