Access USB port from C# and send and receive data

后端 未结 6 1780
终归单人心
终归单人心 2021-02-19 12:04

How to access a USB port in C#, send a data stream and receive other data?

6条回答
  •  失恋的感觉
    2021-02-19 12:09

    The term "usb port" doesn't mean anything. The B in USB means "bus", it is a generic way for any kind of device to talk to the machine. A driver is required to make the device usable. Just as you have drivers for your video card and your NIC.

    A common way make USB device usable from user mode code is for the driver to emulate an old-fashioned serial port. You'd use the SerialPort class in .NET. Check the specs of the device to see what its driver does.

提交回复
热议问题