|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Serial ports.Hi.
I have an app that is going to connect to several virtual com ports, although the system will see them as 'real'. How can I list the installed com ports on the system? I've found System.Io.Ports.xxx but there isn't a count or enumerator? Any ideas? Cheers, Tull. Is this helpfull?
http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/default.aspx TClancey schreef: Show quoteHide quote > Hi. > > I have an app that is going to connect to several virtual com ports, > although the system will see them as 'real'. > > How can I list the installed com ports on the system? I've found > System.Io.Ports.xxx but there isn't a count or enumerator? > > Any ideas? > > Cheers, > Tull. Not really, I'm using vb 2005 so there is a SerialPort control available. I
just need to know how to list the ports in teh system. Thanks, Tull. Show quoteHide quote "Michel van den Berg" <m**@promontis.nl> wrote in message news:1164736146.277002.66470@j72g2000cwa.googlegroups.com... > Is this helpfull? > http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/default.aspx > > > TClancey schreef: > >> Hi. >> >> I have an app that is going to connect to several virtual com ports, >> although the system will see them as 'real'. >> >> How can I list the installed com ports on the system? I've found >> System.Io.Ports.xxx but there isn't a count or enumerator? >> >> Any ideas? >> >> Cheers, >> Tull. > Hi,
The PortName method returns a String array of installed ports. You can download example code from my homepage that illustrates this. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March 2006. See www.hardandsoftware.net for details and contact information. Thanks Dick, which download are you refering to? You have quite a few.
I've tried using GetPortNames.ToString all I get is System.String[] Cheers, Tull. Show quoteHide quote "Dick Grier" <dick_grierNOSPAM@.msn.com> wrote in message news:%23PVr90xEHHA.2356@TK2MSFTNGP03.phx.gbl... > Hi, > > The PortName method returns a String array of installed ports. You can > download example code from my homepage that illustrates this. > > Dick > > -- > Richard Grier, MVP > Hard & Software > Author of Visual Basic Programmer's Guide to Serial Communications, Fourth > Edition, > ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March > 2006. > See www.hardandsoftware.net for details and contact information. > Sorry I see what you mean now.
However if I try Dim p() As String p = IO.Ports.SerialPort.GetPortNames MsgBox(UBound(p)) All I get is '0' Show quoteHide quote "Dick Grier" <dick_grierNOSPAM@.msn.com> wrote in message news:%23PVr90xEHHA.2356@TK2MSFTNGP03.phx.gbl... > Hi, > > The PortName method returns a String array of installed ports. You can > download example code from my homepage that illustrates this. > > Dick > > -- > Richard Grier, MVP > Hard & Software > Author of Visual Basic Programmer's Guide to Serial Communications, Fourth > Edition, > ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March > 2006. > See www.hardandsoftware.net for details and contact information. > Hi,
This is odd. I have no trouble with both actual physical ports AND virtual serial ports. Does HyperTerminal "see" the VP? I assume that when you run my example, you also do not see your ports? Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March 2006. See www.hardandsoftware.net for details and contact information. I wasn't sure which example to download, can you please let me know and I'll
try it. HT sees the com port without any problems. I can open the port in VB and get data, I just can't get the list of ports back. Unless I'm doing something completely wrong! Show quoteHide quote "Dick Grier" <dick_grierNOSPAM@.msn.com> wrote in message news:%23YNCupKFHHA.1216@TK2MSFTNGP05.phx.gbl... > Hi, > > This is odd. I have no trouble with both actual physical ports AND > virtual serial ports. Does HyperTerminal "see" the VP? I assume that > when you run my example, you also do not see your ports? > > Dick > > -- > Richard Grier, MVP > Hard & Software > Author of Visual Basic Programmer's Guide to Serial Communications, Fourth > Edition, > ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March > 2006. > See www.hardandsoftware.net for details and contact information. >
Help - Timing Logic
Datagridview...cell contents Newbie Question here Newbie help: How to detect when a worker thread ihas completed normaly newbie syntax question: adding event handler for button not working How broad should an interface be? Advice needed. Unable to write to file in my web site [OT] VB.Net and MS Access Why does Join method call sit there forever? Error on deleting registry value |
|||||||||||||||||||||||