http://caxapa.ru/1091252.html?todo=full
Но для портов более COM9 CreateFile не работает.
Вот решение:
To open a COM port greater than or equal to COM10, you have to prefix the string "\\.\" to the COM port name. In C it would look like this: CreateFile( "\\\\.\\COM10",...) because you have to escape the "\" character.
https://www.ftdichip.com/Support/Knowledgebase/index.html?howdoiopencom10orhigher.htm
Нужно пристегнуть