I need to create a non-GUI/headless program that communicates with a serial port. The program needs to be written in C++ because of the rest of the application. The standard CLI/CLR serial port class only provides the serial port device name (COM?), and this doesn't give me enough information to open the correct port. The devices that I will be connecting to are USB devices and they don't enumerate in the same order on every power up. For a UWB program there is an interface that will return a string that lists the USB VID & PID which can be used to determine the device I need to connect to. Also the Device Manager Serial Device properties show the same string.
In the suggested duplicate it says to use the ManagementObjectSearcher() call. This call is not available in C++. According to Microsoft documentation this call is C#. The suggested duplicate is not applicable.
Is there any way to get that information in a C++/CLR program?