?
Solved

Windows Registry API for Comm Port

Posted on 1999-01-22
9
Medium Priority
?
294 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
  • 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

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…
Suggested Courses

807 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