Click here to Skip to main content
15,884,537 members
Home / Discussions / C#
   

C#

 
QuestionHow can I find out what "USB Serial Device" is called in all other languages? Pin
arnold_w30-Jun-20 11:14
arnold_w30-Jun-20 11:14 
AnswerRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
Dave Kreskowiak30-Jun-20 11:18
mveDave Kreskowiak30-Jun-20 11:18 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
arnold_w30-Jun-20 11:36
arnold_w30-Jun-20 11:36 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
Dave Kreskowiak30-Jun-20 11:59
mveDave Kreskowiak30-Jun-20 11:59 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
Luc Pattyn30-Jun-20 11:48
sitebuilderLuc Pattyn30-Jun-20 11:48 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
Dave Kreskowiak30-Jun-20 11:59
mveDave Kreskowiak30-Jun-20 11:59 
AnswerRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
Luc Pattyn30-Jun-20 12:35
sitebuilderLuc Pattyn30-Jun-20 12:35 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
arnold_w30-Jun-20 19:52
arnold_w30-Jun-20 19:52 
Luc Pattyn wrote:
1.
SerialPort does enumerate all serial ports as it should, there is no problem, except it does not know about the underlying hardware, so for instance you can't differentiate motherboard vs USB ports.
Then it was a performance issue, I remember I couldn't use this class for a reason. I also refresh the list on the fly each time a USB-cable is connected/disconnected so if I remember correctly it was annoying.
Luc Pattyn wrote:
2.
I trust USB is called USB in all languages that use latin character sets, so you could use String.Contains on the friendlyname.
In my case it's not enough to find anything that contains "USB", I also need to categorize the cable/device and distinguish "USB Serial Device" from "USB Serial Port", my C# application supports products that show up as either one of these.
Luc Pattyn wrote:
I have my own class enumerating all serial ports, its underlying technology is somewhat similar to the class you referred; here it is, use at your leisure. It returns a list of struct ComInfo which holds the friendlyname as well as the location (for USB serial ports this is a concatenation of port numbers, pointing to the USB port actually used).
It has a lot of similarities with the code I'm already using (I slightly modified this code: Svetlin Nakov – Official Web Site and Blog » Enumerate All COM Ports and Find Their Name and Description in C#[^] ). Are you saying your code will always return a description string in English, even if the operating system is non-English or what would I gain be switching to your code?
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
kalberts1-Jul-20 0:09
kalberts1-Jul-20 0:09 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
arnold_w1-Jul-20 0:15
arnold_w1-Jul-20 0:15 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
Luc Pattyn1-Jul-20 1:08
sitebuilderLuc Pattyn1-Jul-20 1:08 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
arnold_w1-Jul-20 1:58
arnold_w1-Jul-20 1:58 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
Luc Pattyn1-Jul-20 2:08
sitebuilderLuc Pattyn1-Jul-20 2:08 
GeneralRe: How can I find out what "USB Serial Device" is called in all other languages? Pin
arnold_w1-Jul-20 2:12
arnold_w1-Jul-20 2:12 
QuestionVS2017 publish project to .exe without manifest files Pin
Member 1487747430-Jun-20 10:35
Member 1487747430-Jun-20 10:35 
AnswerRe: VS2017 publish project to .exe without manifest files Pin
Dave Kreskowiak30-Jun-20 11:15
mveDave Kreskowiak30-Jun-20 11:15 
QuestionOptimize Linq To SQL Query Pin
Kevin Marois30-Jun-20 8:21
professionalKevin Marois30-Jun-20 8:21 
QuestionC# Pin
Member 1258896327-Jun-20 5:30
Member 1258896327-Jun-20 5:30 
AnswerRe: C# Generate a password dictionary to log into API Pin
OriginalGriff27-Jun-20 5:49
mveOriginalGriff27-Jun-20 5:49 
GeneralRe: C# Generate a password dictionary to log into API Pin
Member 1258896327-Jun-20 5:59
Member 1258896327-Jun-20 5:59 
GeneralRe: C# Generate a password dictionary to log into API Pin
OriginalGriff27-Jun-20 6:00
mveOriginalGriff27-Jun-20 6:00 
GeneralRe: C# Generate a password dictionary to log into API Pin
Dave Kreskowiak27-Jun-20 7:10
mveDave Kreskowiak27-Jun-20 7:10 
QuestionBest way to transform list and get top result from custom sort order? Pin
linalinea26-Jun-20 9:44
linalinea26-Jun-20 9:44 
AnswerRe: Best way to transform list and get top result from custom sort order? Pin
OriginalGriff26-Jun-20 11:28
mveOriginalGriff26-Jun-20 11:28 
GeneralRe: Best way to transform list and get top result from custom sort order? Pin
Richard Deeming29-Jun-20 0:21
mveRichard Deeming29-Jun-20 0:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.