Getting Serial Port Information
There is a post about this same issue on MSDN:
Getting more information about a serial port in C#
Hi Ravenb,
We can't get the information through the SerialPort type. I don't know why you need this info in your application. However, there's a solved thread with the same question as you. You can check out the code there, and see if it can help you.
If you have any further problem, please feel free to let me know.
Best regards,
Bruce Zhou
The link in that post goes to this one:
How to get more info about port using System.IO.Ports.SerialPort
You can probably get this info from a WMI query. Check out this tool to help you find the right code. Why would you care though? This is just a detail for a USB emulator, normal serial ports won't have this. A serial port is simply know by "COMx", nothing more.
How to get full name of Port
You need to use WMI:
var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_SerialPort");
foreach (ManagementObject result in searcher.Get())
{
// Look at result["Caption"].ToString() and result["DeviceID"].ToString()
}
Related Topics
What Advantages of Extension Methods Have You Found
"Could Not Load Type [Namespace].Global" Causing Me Grief
Creating Sine or Square Wave in C#
How to Hide a Column (Gridview) But Still Access Its Value
The Maximum Number of Characters a Textbox Can Display
Retrieve Image from Database in ASP.NET
Why Does the Contains() Operator Degrade Entity Framework's Performance So Dramatically
Good Aes Initialization Vector Practice
How to Accept an Array as an ASP.NET MVC Controller Action Parameter
Retrieve System Uptime Using C#
How to Add Claims in ASP.NET Identity
Linq to Entities Only Supports Casting Edm Primitive or Enumeration Types with Ientity Interface
Retrieving the Calling Method Name from Within a Method
Where's the Datetime 'Z' Format Specifier
How to Export a Jqgrid Data to Excel Using C#
What Is the Worst Gotcha in C# or .Net
Getting Http Status Code Number (200, 301, 404, etc.) from Httpwebrequest and Httpwebresponse