?
Solved

Windows Registry API for Comm Port

Posted on 1999-01-22
9
Medium Priority
?
292 Views
Last Modified: 2008-03-17
Is there an API to find the base address and IRQ for a given comm port that will work on the Windows NT, 95, and 98 platforms?
0
Comment
Question by:bfharmon
[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
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1470116
????

I/O port addresses are a *given* COM1 = 3F8/IRQ4, COM2 = 2F8/IRQ3, has been since time began.

M

0
 

Author Comment

by:bfharmon
ID: 1470117
Windows control panel allows the user to change the IRQ for the com port.  There are also modems installed on com ports 3 & 4.  The base address can also be modified for each of these within control panel.  If everyone accepted the defaults for these com ports, my life would be much easier.  However, they don't.  Windows keeps track of them in the registry and I need an API to query the com port for the address and IRQ.  I have found a way for Windows NT, but it will not work on 95, and probably not on 98.

There is an API "RegQueryEx" that allows me to look at a specific key and sub key.  But, I was wondering if there was a more intuitive API that would return the data I am looking for?
0
 

Author Comment

by:bfharmon
ID: 1470118
Mark, why haven't you responded to my reply?  Please answer.
0
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!

 
LVL 7

Expert Comment

by:linda101698
ID: 1470119
I sent an email to  mark2150 asking him to take a look at this question.  If he does not respond in the next couple day, an a comment to your question in customer service asking me to delete the question so you can repost.

Linda Gardner
Customer Service @ Experts Exchange
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 200 total points
ID: 1470120
This is ODD! I posted a reply yesterday, yet it's no-where to be seen!

Anyway, I disagree with your assertion that windows can reprogram the I/O addresses. This is simply not possible unless the software can transmute the PC board wiring. The I/O addresses can be aliased, or masked, but a COM port card will be at the addresses shown no matter what. This is intrinsic to the design of the system and is not going to change.

M

0
 
LVL 1

Expert Comment

by:gigo30
ID: 3076275
IRQ can be changed via System Settings, Device manager, click on Ports, choose a COM port. Click Properties, go to the Resources tab, uncheck Automatic setting.

So how do we find which IRQ a COM port has? What if the person has changed it on the hardware end?

0
 

Author Comment

by:bfharmon
ID: 3077104
Thanks Mark.  I know that windows only "masks" the IRQ.  The real quesiton was where is that information stored, and is there an API to get to it?

Unfortunately I had to write a bunch of code to extract the information from the registry.  Want me to turn it into an API?
0
 
LVL 1

Expert Comment

by:gigo30
ID: 3086071
Is this IRQ info in the Win 98 registry? I did a search of the whole registry for "IRQ" and didn't find it. I'd be interested in getting this VB code.
I hope it works on VB4-32.
0
 

Author Comment

by:bfharmon
ID: 3086310
Yes, it does.  Send me your email address, and I'll try to package it up as best as I can for you.  I am at bfharmon@yahoo.com
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
Suggested Courses

649 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