471,073 Members | 1,279 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

serial port

ST
I want my program to show the number and name of the serial ports on my
computer in the same style at e.g. Hyperterminal. Like,,,if the computer has
2 serial ports there will only be 2 serial ports on the list,,,or 10 if the
computer has 10.

Any suggestions on how this can be done ?
Jul 17 '05 #1
5 8280
ST wrote:
I want my program to show the number and name of the serial ports on my
computer in the same style at e.g. Hyperterminal. Like,,,if the computer has
2 serial ports there will only be 2 serial ports on the list,,,or 10 if the
computer has 10.

Any suggestions on how this can be done ?


The current ports are listed in the registry:
HKEY_LOCAL_MACHINE/HARDWARE/DEVICEMAP/SERIALCOMM (on winXP)

Reading from here works well because this list is dynamically created
(i.e. if a virtual serial port is created via USB)

Hope this helps,

Jamie
Jul 17 '05 #2
ST
I'm sure it does, thanks.

"jamie" <ja***@noway.com> wrote in message
news:jY*********************@news20.bellglobal.com ...
ST wrote:
I want my program to show the number and name of the serial ports on my
computer in the same style at e.g. Hyperterminal. Like,,,if the computer has 2 serial ports there will only be 2 serial ports on the list,,,or 10 if the computer has 10.

Any suggestions on how this can be done ?


The current ports are listed in the registry:
HKEY_LOCAL_MACHINE/HARDWARE/DEVICEMAP/SERIALCOMM (on winXP)

Reading from here works well because this list is dynamically created
(i.e. if a virtual serial port is created via USB)

Hope this helps,

Jamie

Jul 17 '05 #3
like this? ... http://vbnet.mvps.org/code/system/comtestmscomm.htm or
http://vbnet.mvps.org/code/system/comtestapi.htm

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"ST" <No*@valid.com> wrote in message
news:41*********************@dread16.news.tele.dk. ..
:I want my program to show the number and name of the serial ports on my
: computer in the same style at e.g. Hyperterminal. Like,,,if the computer
has
: 2 serial ports there will only be 2 serial ports on the list,,,or 10 if
the
: computer has 10.
:
: Any suggestions on how this can be done ?
:
:

Jul 17 '05 #4
ST
What this code does, is giving me the active ports on the computer. Not the
amount of installed ports on the computer.
"Randy Birch" <rg************@mvps.org> wrote in message
news:Ar*********************@twister01.bloor.is.ne t.cable.rogers.com...
like this? ... http://vbnet.mvps.org/code/system/comtestmscomm.htm or
http://vbnet.mvps.org/code/system/comtestapi.htm

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"ST" <No*@valid.com> wrote in message
news:41*********************@dread16.news.tele.dk. ..
:I want my program to show the number and name of the serial ports on my
: computer in the same style at e.g. Hyperterminal. Like,,,if the computer
has
: 2 serial ports there will only be 2 serial ports on the list,,,or 10 if
the
: computer has 10.
:
: Any suggestions on how this can be done ?
:
:

Jul 17 '05 #5
Then you want this ... http://vbnet.mvps.org/code/enums/enumports.htm

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"ST" <ST@notvalid.dk> wrote in message
news:41*********************@dread16.news.tele.dk. ..
: What this code does, is giving me the active ports on the computer. Not
the
: amount of installed ports on the computer.
:
:
: "Randy Birch" <rg************@mvps.org> wrote in message
: news:Ar*********************@twister01.bloor.is.ne t.cable.rogers.com...
: > like this? ... http://vbnet.mvps.org/code/system/comtestmscomm.htm or
: > http://vbnet.mvps.org/code/system/comtestapi.htm
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: >
: > "ST" <No*@valid.com> wrote in message
: > news:41*********************@dread16.news.tele.dk. ..
: > :I want my program to show the number and name of the serial ports on my
: > : computer in the same style at e.g. Hyperterminal. Like,,,if the
computer
: > has
: > : 2 serial ports there will only be 2 serial ports on the list,,,or 10
if
: > the
: > : computer has 10.
: > :
: > : Any suggestions on how this can be done ?
: > :
: > :
: >
:
:

Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by ^CeFoS^ | last post: by
2 posts views Thread by willie | last post: by
3 posts views Thread by collinm | last post: by
13 posts views Thread by Al the programmer | last post: by
13 posts views Thread by Rob | last post: by
4 posts views Thread by rowan | last post: by
3 posts views Thread by naveen.sabapathy | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.