C# SerialPort#Open() method throws ArgumentException because of port name?

前端 未结 1 1755
Happy的楠姐
Happy的楠姐 2020-12-22 07:51

On my local machine,

  • Windows XP
  • Ports (COM & LPT)
    • COM3
    • RIM Virtual Serial Port v2 (COM4)
    • RIM Virtual Serial Port v2 (C
1条回答
  •  梦毁少年i
    2020-12-22 08:01

    have a look at http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/35954173-2eeb-46af-bb3e-86840c6b5484

    seems the problem was that those COM ports were mapped to something else and gives this strange error in response.

    I had exactly the same problem. I found that I had a windows printer setup to use the same port. As soon as I changed the port in the printers settings, the SerialPort.Open() worked.

    0 讨论(0)
提交回复
热议问题