Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
serial port
Old
  (#1)
ST
Guest
 
Posts: n/a
Default serial port - 06-04-2007, 09:47 AM

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 ?


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: serial port
Old
  (#2)
jamie
Guest
 
Posts: n/a
Default Re: serial port - 06-04-2007, 09:47 AM

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
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: serial port
Old
  (#3)
ST
Guest
 
Posts: n/a
Default Re: serial port - 06-04-2007, 09:47 AM

I'm sure it does, thanks.

"jamie" <EMAIL REMOVED> wrote in message
news:jYoVc.25501$EMAIL REMOVED ...
> 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



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: serial port
Old
  (#4)
Randy Birch
Guest
 
Posts: n/a
Default Re: serial port - 06-04-2007, 09:47 AM

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" <EMAIL REMOVED> wrote in message
news:4125eb62$0$284$EMAIL REMOVED. ..
: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 ?
:
:

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: serial port
Old
  (#5)
ST
Guest
 
Posts: n/a
Default Re: serial port - 06-04-2007, 09:47 AM

What this code does, is giving me the active ports on the computer. Not the
amount of installed ports on the computer.


"Randy Birch" <EMAIL REMOVED> wrote in message
news:ArvVc.1830908$EMAIL REMOVED 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" <EMAIL REMOVED> wrote in message
> news:4125eb62$0$284$EMAIL REMOVED. ..
> :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 ?
> :
> :
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: serial port
Old
  (#6)
Randy Birch
Guest
 
Posts: n/a
Default Re: serial port - 06-04-2007, 09:47 AM

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" <EMAIL REMOVED> wrote in message
news:412878e8$0$314$EMAIL REMOVED. ..
: What this code does, is giving me the active ports on the computer. Not
the
: amount of installed ports on the computer.
:
:
: "Randy Birch" <EMAIL REMOVED> wrote in message
: news:ArvVc.1830908$EMAIL REMOVED 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" <EMAIL REMOVED> wrote in message
: > news:4125eb62$0$284$EMAIL REMOVED. ..
: > :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 ?
: > :
: > :
: >
:
:

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top