0

I am trying to get the names of the serial ports in a C++ program. These ports were created by using com0com program. I searched it at windows website but it is explained by using C# .My purpose is that I should be able to get the names (etc COM1 , COM2 .. ) and place them in a combo box.Is there any function to do this ? Best regards

krl
  • 73
  • 2
  • 6
  • If it is managed code, you can still use the C# version. https://msdn.microsoft.com/en-us/library/system.io.ports.serialport.getportnames(v=vs.90).aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-2 – cup Sep 17 '15 at 12:00
  • Read it from the registry, just like [C# does it](http://referencesource.microsoft.com/#System/sys/system/io/ports/SerialPort.cs,6e8f9abfa6f4bdef). – Hans Passant Sep 17 '15 at 12:02

0 Answers0