473,498 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How many comm ports??

Is there any code to get the number of comm ports detected by the pc?

Cheers.
Mar 1 '06 #1
1 1658
Hi,

Using .NET 2.0:

Console.Writeline("Found " + SerialPort.GetPortNames().Length
+ " serial ports, enumerating:");
foreach (string s in SerialPort.GetPortNames())
{
Console.Writeline(s);
}

Janiek

On Wed, 1 Mar 2006 04:43:28 -0800, "James L"
<Ja****@discussions.microsoft.com> wrote:
Is there any code to get the number of comm ports detected by the pc?

Cheers.


Mar 1 '06 #2

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

Similar topics

0
2120
by: Greg Pedder | last post by:
Hello. I have an application that uses the Java Communications API to use a modem. At startup, the application checks to see what serial devices are connected. For each serial device, the app...
1
1919
by: Ky Nguyen | last post by:
Hi all, I would like to obtain a piece of codes (a full version or just an example) dealing with asynchronous communication via COM: serial port. I dont mind whether it is window-based or...
3
9311
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....
3
1521
by: Steve | last post by:
Hi All and seasons greetings. Is there an easy way of getting a list of current Comm ports on a machine? I suspect that most machines these days have 1 and 2, but there could be others and I...
7
3677
by: Padu | last post by:
Hi Everybody, I'm a newcomer from the Delphi world and I'm going to start developing my new project (a robot control app) in C#. One of the requirements is to communicate using RS232 (well,...
0
1414
by: joaquimfpinto | last post by:
Hi All, I've an application that write and read from different serial ports. I made a class with an object from Charon Communications. On the main form I create several instances of that...
2
1883
by: Hank | last post by:
Hello, I would like to get some opinions on using the Comm Port with Access 2000. We have a few jobs coming in that require us to interface with a PLC via the Comm Port. My partner feels we...
0
1087
by: alvatar | last post by:
I am doing a project on microcontrollers and want to be able to send and receive data via RS232 serial cable. Right now, my PIC microcontroller code is able to send string data to the computer and...
9
6453
by: rajujrk | last post by:
hi, currently i am doing the project to send the sms from PC to Mobile and vice versa using GSM modem. I successfully done this process in Hyperterminal. First i connect the GSM modem in COM1 port...
0
7125
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
7205
jinu1996
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...
0
7379
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...
0
4590
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...
0
3093
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...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1419
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 ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
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...

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.