Solved

Working with a modem

Posted on 1998-11-01
2
275 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 50 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

685 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