First, you should make sure that the data is sent out and the serial port received them. To ensure taht, you can link your computer to another with serial cable to see if you can receive the data sent by your computer. Second, you should check the the nByteRead after the method of ReadData is called, it should contains the number of bytes you send. Third, you should reset the buffer before you use it with 0x0.
你可以在int nBytesRead = serial.ReadData(lpBuffer, 500);之前加一句ZeroMemory将缓冲区置空。
至于你提到的将串口的2,3相连,你的意思是自已发送再自已接收吗?
,不过我没见过这种用法的。你用两台机相连试试。
但是事实并没用收到信息。所以仍是初始数据呀。