Solved

Find the number of serial and parallel ports on computer

Posted on 2003-11-06
7
266 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
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now