mece
asked on
Find the number of serial and parallel ports on computer
How can i find the number of serial and parallel ports on any computer (98 or NT)
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 :-) )
(You could even give me the points :-) )
ASKER
but that is not the answer
i found the answr at the internet
the answer is look to the registry
HKEY_LOCAL_MACHINE\HARDWAR E\DEVICEMA P\PARALLEL PORTS
HKEY_LOCAL_MACHINE\HARDWAR E\DEVICEMA P\SERIALCO MM
i found the answr at the internet
the answer is look to the registry
HKEY_LOCAL_MACHINE\HARDWAR
HKEY_LOCAL_MACHINE\HARDWAR
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i tried at 98 and above,
i dont tried at windows 95,
i dont tried at windows 95,
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.