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
Solved

Working with a modem

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 75
Windows Script Host failed (Access is denied.) error 6 214
Sending a email via excel using vba 6 95
passing a value with stream reader AFTER a ";" 3 74
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…

789 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