Home > Enterprise >  Which Win API does QtSerialPort use?
Which Win API does QtSerialPort use?

Time:11-22

There are servral USB libraries out there. I have tried libusb and it won't work for me. I cannot connect my USB device with that library because my driver for that USB device is using usbser.sys driver. My USB device is a Communication Device Class (CDC).

The only USB library that works for me is QtSerialPort (I have not tested Win32 API yet) and now to the question: If QtSerialPort only works for my USB device, what API does QtSerialPort use then? Does QtSerialPort use internal Win32 API functions, or own internal API?

CodePudding user response:

On Windows, QtSerialPort uses the Windows API to communicate with serial ports (CreateFile, WriteFile, ReadFile, SetCommTimeouts, etc.).

You can read the relevant source code here:

https://github.com/qt/qtserialport/blob/dev/src/serialport/qserialport_win.cpp

  • Related