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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sumant032199Connect With a Mentor Commented:
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
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
nietodCommented:
How do you know its windows?
0
 
scotdanceAuthor Commented:
The program is to run in DOS
0
 
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
All Courses

From novice to tech pro — start learning today.