Solved

Find the number of serial and parallel ports on computer

Posted on 2003-11-06
7
274 Views
Last Modified: 2010-04-05
How can i find the number of serial and parallel ports on any computer (98 or NT)
0
Comment
Question by:mece
[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
  • 3
  • 2
7 Comments
 
LVL 12

Expert Comment

by:andrewjb
ID: 9694669
I've never found a decent way by looking in the registry or anything like that. Some things work on NT, some on 95/98, but not on both.

To find serial ports, I simply try to Open every 'file' named "COM1" , "COM2", .... up to, sayt "COM99"
It either works, fails with an error code that means 'not there' or fails with an error code that means 'exists, but open by someone else'.

That's the only way I've come up with so far.
0
 
LVL 12

Expert Comment

by:andrewjb
ID: 9771311
As a comment, this took me quite a while to figure out, so it might be worth PAQ-ing as a possible solution. I haven't found or come up with anything better since.
(You could even give me the points :-)  )
0
 

Author Comment

by:mece
ID: 9773226
but that is not the answer
i found the answr at the internet
the answer is look to the registry
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\PARALLEL PORTS
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM


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 12

Expert Comment

by:andrewjb
ID: 9796046
OK - if you think that's the answer, it would be useful to expand a little so this question can be PAQ-d for future reference.

I'm not convinced, though. Have you tried tihs on Win95/98, NT, XP and 2000? I'm pretty sure I took that path, too, and it doesn't work on all platforms.
0
 
LVL 2

Accepted Solution

by:
Lunchy earned 0 total points
ID: 9799809
PAQed - no points refunded (of 50)

Lunchy
Friendly Neighbourhood Community Support Admin
0
 

Author Comment

by:mece
ID: 9800115
i tried at 98 and above,
i dont tried at windows 95,
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

726 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