Com port and process
C#
3
Posts
2
Posters
0
Views
1
Watching
-
Hello friends, I want to know, can we get the COM Port list (device attached to pc). and the process name using the the COM port in C#. Thanks in Advance. Rahul Kulkarni
If you are using .NET 2, you can use:
string[] portNames = System.IO.Ports.SerialPort.GetPortNames();
If it's .NET 1/1.1 you will have to enumerate the registry entries at HKLM\Hardware\DeviceMap\SerialComm.
Deja View - the feeling that you've seen this post before.
-
If you are using .NET 2, you can use:
string[] portNames = System.IO.Ports.SerialPort.GetPortNames();
If it's .NET 1/1.1 you will have to enumerate the registry entries at HKLM\Hardware\DeviceMap\SerialComm.
Deja View - the feeling that you've seen this post before.