Solved

Windows Registry API for Comm Port

Posted on 1999-01-22
9
276 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 12

Accepted Solution

by:
mark2150 earned 100 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
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 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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now