//CString sPort;
//exercise. Format (_T("\\\\). \\COM%d "),3); //serial port 2
hCom = CreateFile("COM 1 ",GENERIC_READ | GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,NULL);
If the USB-to-232 chip uses PL2303 and the corresponding driver is installed, can this original way of operating com port operate USB port?
After that:
I bought a USB-to-serial cable, and the chip is CH340.
Install the driver and display the serial number. But the external device shows USB-SERIAL CH340(COM 1).
For the point attribute, the following common address is Port_#0002. Hub_#0005。
I can't complete the normal data exchange by crossing two lines with 2-3 ports.
1 line, 2-3 ports are short-circuited, and data can be sent and received.