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. 7 1276
Is this helpfull? http://msdn.microsoft.com/msdnmag/is...m/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.
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.
"Michel van den Berg" <mv*@promontis. nlwrote in message
news:11******** *************@j 72g2000cwa.goog legroups.com...
Is this helpfull? http://msdn.microsoft.com/msdnmag/is...m/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.Port s.xxx but there isn't a count or enumerator?
Any ideas?
Cheers, Tull.
Thanks Dick, which download are you refering to? You have quite a few.
I've tried using GetPortNames.To String all I get is System.String[]
Cheers,
Tull.
"Dick Grier" <dick_grierNOSP AM@.msn.comwrot e in message
news:%2******** ********@TK2MSF TNGP03.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.Serial Port.GetPortNam es
MsgBox(UBound(p ))
All I get is '0'
"Dick Grier" <dick_grierNOSP AM@.msn.comwrot e in message
news:%2******** ********@TK2MSF TNGP03.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!
"Dick Grier" <dick_grierNOSP AM@.msn.comwrot e in message
news:%2******** ********@TK2MSF TNGP05.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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: M. Raab |
last post by:
i have written an application that utilizes serail ports. In order not to
have to reinvent code, I decided to use John Hind's sample code that he
presented in MSDN magazine last year (Serial Comm: Use P/Invoke to Develop a
..NET Base Class Library for Serial Device Communications John Hind - MSDN
Magazine - October 2002)
it works fine except for one problem. i cannot address any port higher than
COM9. I am using an equinox multi-serial...
|
by: Al the programmer |
last post by:
I need to access the serial ports on my webserver from an asp.net page. I
have no problem accessing the serial ports from a windows form application,
but the code doesn't work in asp.net. I have been told it is not possible to
access the serial ports from asp.net.
The application is used to control custom hardware. The hardware is
connected to a PC through serial ports. Our customer wants to control the
hardware from a remote...
|
by: David |
last post by:
I have written an application in VB.NET 2003 that uses the SAX serial
component for RS232 communications with hardware.
The program sets up 2 serial ports so that it can talk to 2 different
hardware devices simultaneaously.
When I run the program on a desktop running Windows 2000 it works fine. When
I run it on a Laptop using XP I start having problems.
It seems that when the ports are initiated, either one will work but not the
|
by: henrycortezwu |
last post by:
Hi All,
I'm trying to connect to a virtual port (COM19, OUTGOING, "Bluetooth
Serial Port") using VS2005 System.IO.Ports.
When I ran the ff code below here's what happens.
1) VS2005 Compiles w/o errors
2) My Nokia 6600 prompted me the message "Accept Connection request
from DEMON?"
note: DEMON is my computers name.
3) Using my Nokia 6600, I hit the button that refers to the "Yes"
|
by: Tom Brown |
last post by:
Hey people,
I've written a python app that r/w eight serial ports to control eight devices
using eight threads. This all works very nicely in Linux. I even put a GUI on
it using PyQt4. Still works nicely.
Then I put the app on on a virtual Windows machine running inside of vmware on
the same Linux box. Vmware only lets me have four serial ports so I run the
app against four serial ports using four threads. The app did not respond...
| |
by: LongBow |
last post by:
Hello,
Is there a way, in .NET, to determine what are the avialable Serial
(Communications) Ports on a Windows OS and is there a way to determine
that port isn't being use other than attempting to opening the Serial
Port and catching the associated exception? Thanks
If there isn't a way to determine the Serial Port within .NET I would
be willing, I guess, to use a WinAPI is that was the only way.
|
by: joaquimfpinto |
last post by:
Dear All,
I made an app in c# that uses several serial ports.
For the serial ports I use a pnp Sunix board, some with 8 serial ports
other with 4 or even 2 serial ports.
Whenever I use the development computer I don't have ay problem with
my application.
|
by: naveen.sabapathy |
last post by:
Hi,
I am trying to use virtual serial ports to develop/test my serial
communication program. Running in to trouble...
I am using com0com to create the virtual ports. The virtual ports
seem to be working fine when I test it with Hyperterminal .
I am using the example program that comes with pyserial, as below.
---------------
import serial
|
by: Nasif |
last post by:
Currently I am writing a program which sends and receives messages
through serial port to a device. I am using C# and Microsoft Visual
studio 2005 for windows program. But my problem is when i try to write
in serial port from my windows a Timeoutexception is thrown. I use
SerialPort class in System.IO.Ports and for writing port i used
write() function under the built in class SerialPort. But when i use
hyperterminal , everything goes fine....
|
by: Dave Harry |
last post by:
I'm using the following code to determine the available serial ports:
ComboBoxPort.Items.Clear()
For Each sp As String In My.Computer.Ports.SerialPortNames
ComboBoxPort.Items.Add(sp)
Next
It worked well in XP, but under Vista (now with SP1) the Bluetooth ports
don't show correctly.
We have half a dozen different brands and types of Bluetooth on various
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |