Solved

Windows Registry API for Comm Port

Posted on 1999-01-22
9
289 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Advice in Xamarin 21 118
converting visio 2010 to powerpoint 2010  - formatting issues 5 118
Export Data to Different .csv Files 27 131
add criteria to query in VB, Access 2003 2 47
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

736 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