?
Solved

Windows Registry API for Comm Port

Posted on 1999-01-22
9
Medium Priority
?
291 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
Independent Software Vendors: 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

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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
Course of the Month10 days, 4 hours left to enroll

762 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