Reading Comm Ports

I'm writing a C program and need to attach the code to determine what the address of comm ports on a computer are.  Need the code to incorporate within my own code. Apprecite any help.
Cheers
scotdanceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nietodCommented:
What OS?  If this is windows--win32--then you can't access the comm ports directly.  You need to access them through the windows API functions (or write a device driver).
0
danelroismanCommented:
Look at that:

http://www.r2m.com/win-developer-FAQ/serial/6.html

I think it's what you need.
0
nietodCommented:
How do you know its windows?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

scotdanceAuthor Commented:
The program is to run in DOS
0
sumant032199Commented:
The port address may be
com1 0x3F8
com2 0x2F8

If MS-DOS is installed in your computer then you can check the addresses by using the external DOS command "MSD.EXE"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sumant032199Commented:
If you want detail info in windows you can run
"C:\Program Files\Common Files\Microsoft Shared\MSinfo\MSINFO32.EXE"
0
scotdanceAuthor Commented:
Sumant

Can this determine what ports are not getting used??
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Software

From novice to tech pro — start learning today.