473,396 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

List COM ports

How can I find out what COM ports that exists on my computer?
Apr 21 '06 #1
4 17671

"Joachim" <Jo*****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
How can I find out what COM ports that exists on my computer?


string[] lPorts = System.IO.Ports.SerialPort.GetPortNames();
Apr 21 '06 #2
..NET 2.0: SerialPort.GetPortNames();
..NET 1.1.: WMI with "Select * from Win32_POTSModem"

"Joachim" wrote:
How can I find out what COM ports that exists on my computer?


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Apr 21 '06 #3
WMI: Win32_SerialPort
Win32_POTSModem is for a modem device.

Note also that this only returns the standard BIOS Serial ports as per
PC98/99 standards.

Willy.

"Michael Nemtsev" <Mi************@discussions.microsoft.com> wrote in
message news:2F**********************************@microsof t.com...
| .NET 2.0: SerialPort.GetPortNames();
| .NET 1.1.: WMI with "Select * from Win32_POTSModem"
|
| "Joachim" wrote:
|
| > How can I find out what COM ports that exists on my computer?
|
| --
| WBR,
| Michael Nemtsev :: blog: http://spaces.msn.com/laflour
|
| "At times one remains faithful to a cause only because its opponents do
not
| cease to be insipid." (c) Friedrich Nietzsche
|
Apr 21 '06 #4
miss a bit

"Willy Denoyette [MVP]" wrote:
WMI: Win32_SerialPort
Win32_POTSModem is for a modem device.

Note also that this only returns the standard BIOS Serial ports as per
PC98/99 standards.

Willy.

"Michael Nemtsev" <Mi************@discussions.microsoft.com> wrote in
message news:2F**********************************@microsof t.com...
| .NET 2.0: SerialPort.GetPortNames();
| .NET 1.1.: WMI with "Select * from Win32_POTSModem"
|
| "Joachim" wrote:
|
| > How can I find out what COM ports that exists on my computer?
|
| --
| WBR,
| Michael Nemtsev :: blog: http://spaces.msn.com/laflour
|
| "At times one remains faithful to a cause only because its opponents do
not
| cease to be insipid." (c) Friedrich Nietzsche


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Apr 21 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Krunoslav Ostrouska | last post by:
How can i get a list of available COM Ports on a machine? Thanks
2
by: Claire | last post by:
I'm using the following code in an attempt to obtain a list of available serial ports. I expected to retrieve the same values as listed in hardware manager in Control panel but I'm not. I'm being...
1
by: SRB | last post by:
Hi, I am trying to find the list of available ports in a system using C# with ..NET 1.1 Could you please lead me to any APi's or the algorithm to find the ports available. Any help with...
3
by: andyI | last post by:
Where do I find information on how to address and pass data to and from the serial ports and USB ports in VB. VB6 supports the serial ports easily but I see no reference to using the USB ports....
1
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...
2
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...
11
by: kudruu | last post by:
Hi, I am trying to find a way to populate a list of active Com ports on a computer. There may be around 30 on one computer and all connected to different Buses but I am looking for one in...
3
by: kudruu | last post by:
Hi, I tried posting this in comp.lang.C but need more specific help using winAPI. I am trying to find a way to populate a list of active Com ports on a computer. There may be around 30 on one...
10
by: sklett | last post by:
I'm trying to send some printer commands (ZPLII) to an attached USB printer using the SerialPort component. I didn't get very far at all. In fact I haven't gotten anywhere. The first problem I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.