Solved

Find the number of serial and parallel ports on computer

Posted on 2003-11-06
7
278 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
Technology Partners: 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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